#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for PHP 8.5.7.
#
# Report bugs to <https://github.com/php/php-src/issues>.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
# Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else case e in #(
  e) case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac ;;
esac
fi



# Reset variables that may have inherited troublesome values from
# the environment.

# IFS needs to be set, to space, tab, and newline, in precisely that order.
# (If _AS_PATH_WALK were called with IFS unset, it would have the
# side effect of setting IFS to empty, thus disabling word splitting.)
# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
IFS=" ""	$as_nl"

PS1='$ '
PS2='> '
PS4='+ '

# Ensure predictable behavior from utilities with locale-dependent output.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# We cannot yet rely on "unset" to work, but we need these variables
# to be unset--not just set to an empty or harmless value--now, to
# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
# also avoids known problems related to "unset" and subshell syntax
# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
do eval test \${$as_var+y} \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done

# Ensure that fds 0, 1, and 2 are open.
if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi

# The user is always right.
if ${PATH_SEPARATOR+false} :; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# Find who we are.  Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
  done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as 'sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi


# Use a proper internal environment variable to ensure we don't fall
  # into an infinite loop, continuously re-executing ourselves.
  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
    _as_can_reexec=no; export _as_can_reexec;
    # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed 'exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
  fi
  # We don't want this to propagate to other subprocesses.
          { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
  as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
  setopt NO_GLOB_SUBST
else case e in #(
  e) case \`(set -o) 2>/dev/null\` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac ;;
esac
fi
"
  as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }

exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" )
then :

else case e in #(
  e) exitcode=1; echo positional parameters were not saved. ;;
esac
fi
test x\$exitcode = x0 || exit 1
blah=\$(echo \$(echo blah))
test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
  if (eval "$as_required") 2>/dev/null
then :
  as_have_required=yes
else case e in #(
  e) as_have_required=no ;;
esac
fi
  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
then :

else case e in #(
  e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
  as_found=:
  case $as_dir in #(
	 /*)
	   for as_base in sh bash ksh sh5; do
	     # Try only shells that exist, to save several forks.
	     as_shell=$as_dir$as_base
	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
  CONFIG_SHELL=$as_shell as_have_required=yes
		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
then :
  break 2
fi
fi
	   done;;
       esac
  as_found=false
done
IFS=$as_save_IFS
if $as_found
then :

else case e in #(
  e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
  CONFIG_SHELL=$SHELL as_have_required=yes
fi ;;
esac
fi


      if test "x$CONFIG_SHELL" != x
then :
  export CONFIG_SHELL
             # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed 'exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi

    if test x$as_have_required = xno
then :
  printf "%s\n" "$0: This script requires a shell more modern than all"
  printf "%s\n" "$0: the shells that I found on your system."
  if test ${ZSH_VERSION+y} ; then
    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
  else
    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
$0: https://github.com/php/php-src/issues about your
$0: system, including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
  fi
  exit 1
fi ;;
esac
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS

## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset


# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p

# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else case e in #(
  e) as_fn_append ()
  {
    eval $1=\$$1\$2
  } ;;
esac
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else case e in #(
  e) as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  } ;;
esac
fi # as_fn_arith


# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  printf "%s\n" "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits


  as_lineno_1=$LINENO as_lineno_1a=$LINENO
  as_lineno_2=$LINENO as_lineno_2a=$LINENO
  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      t clear
      :clear
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }

  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  # already done that, so ensure we don't try to do so again and fall
  # in an infinite loop.  This has already happened in practice.
  _as_can_reexec=no; export _as_can_reexec
  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


# Determine whether it's possible to make 'echo' print without a newline.
# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

# For backward compatibility with old third-party macros, we provide
# the shell variables $as_echo and $as_echo_n.  New code should use
# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
as_echo='printf %s\n'
as_echo_n='printf %s'

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
    # In both cases, we have to default to 'cp -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_test_x='test -x'
as_executable_p=as_fn_executable_p

# Sed expression to map a string onto a valid CPP name.
as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated

# Sed expression to map a string onto a valid variable name.
as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
as_tr_sh="eval sed '$as_sed_sh'" # deprecated

as_awk_strverscmp='
  # Use only awk features that work with 7th edition Unix awk (1978).
  # My, what an old awk you have, Mr. Solaris!
  END {
    while (length(v1) && length(v2)) {
      # Set d1 to be the next thing to compare from v1, and likewise for d2.
      # Normally this is a single character, but if v1 and v2 contain digits,
      # compare them as integers and fractions as strverscmp does.
      if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
	# Split v1 and v2 into their leading digit string components d1 and d2,
	# and advance v1 and v2 past the leading digit strings.
	for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
	for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
	d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
	d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
	if (d1 ~ /^0/) {
	  if (d2 ~ /^0/) {
	    # Compare two fractions.
	    while (d1 ~ /^0/ && d2 ~ /^0/) {
	      d1 = substr(d1, 2); len1--
	      d2 = substr(d2, 2); len2--
	    }
	    if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
	      # The two components differ in length, and the common prefix
	      # contains only leading zeros.  Consider the longer to be less.
	      d1 = -len1
	      d2 = -len2
	    } else {
	      # Otherwise, compare as strings.
	      d1 = "x" d1
	      d2 = "x" d2
	    }
	  } else {
	    # A fraction is less than an integer.
	    exit 1
	  }
	} else {
	  if (d2 ~ /^0/) {
	    # An integer is greater than a fraction.
	    exit 2
	  } else {
	    # Compare two integers.
	    d1 += 0
	    d2 += 0
	  }
	}
      } else {
	# The normal case, without worrying about digits.
	d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
	d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
      }
      if (d1 < d2) exit 1
      if (d1 > d2) exit 2
    }
    # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
    # which mishandles some comparisons of empty strings to integers.
    if (length(v2)) exit 1
    if (length(v1)) exit 2
  }
'


# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}

case X$ECHO in
X*--fallback-echo)
  # Remove one level of quotation (which was required for Make).
  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
  ;;
esac

echo=${ECHO-echo}
if test "X$1" = X--no-reexec; then
  # Discard the --no-reexec flag, and continue.
  shift
elif test "X$1" = X--fallback-echo; then
  # Avoid inline document here, it may be left over
  :
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  # Yippee, $echo works!
  :
else
  # Restart under the correct shell.
  exec $SHELL "$0" --no-reexec ${1+"$@"}
fi

if test "X$1" = X--fallback-echo; then
  # used as fallback echo
  shift
  cat <<EOF
$*
EOF
  exit 0
fi

# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

if test -z "$ECHO"; then
if test "X${echo_test_string+set}" != Xset; then
# find a string as large as possible, as long as the shell can cope with it
  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
       echo_test_string=`eval $cmd` &&
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
    then
      break
    fi
  done
fi

if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
   test "X$echo_testing_string" = "X$echo_test_string"; then
  :
else
  # The Solaris, AIX, and Digital Unix default echo programs unquote
  # backslashes.  This makes it impossible to quote backslashes using
  #   echo "$something" | sed 's/\\/\\\\/g'
  #
  # So, first we look for a working echo in the user's PATH.

  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  for dir in $PATH /usr/ucb; do
    IFS="$lt_save_ifs"
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
       test "X$echo_testing_string" = "X$echo_test_string"; then
      echo="$dir/echo"
      break
    fi
  done
  IFS="$lt_save_ifs"

  if test "X$echo" = Xecho; then
    # We didn't find a better echo, so look for alternatives.
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
       test "X$echo_testing_string" = "X$echo_test_string"; then
      # This shell has a builtin print -r that does the trick.
      echo='print -r'
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
      # If we have ksh, try running configure again with it.
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
      export ORIGINAL_CONFIG_SHELL
      CONFIG_SHELL=/bin/ksh
      export CONFIG_SHELL
      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
    else
      # Try using printf.
      echo='printf %s\n'
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
	 test "X$echo_testing_string" = "X$echo_test_string"; then
	# Cool, printf works
	:
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
	   test "X$echo_testing_string" = 'X\t' &&
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
	   test "X$echo_testing_string" = "X$echo_test_string"; then
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
	export CONFIG_SHELL
	SHELL="$CONFIG_SHELL"
	export SHELL
	echo="$CONFIG_SHELL $0 --fallback-echo"
      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
	   test "X$echo_testing_string" = 'X\t' &&
	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
	   test "X$echo_testing_string" = "X$echo_test_string"; then
	echo="$CONFIG_SHELL $0 --fallback-echo"
      else
	# maybe with a smaller string...
	prev=:

	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
	  then
	    break
	  fi
	  prev="$cmd"
	done

	if test "$prev" != 'sed 50q "$0"'; then
	  echo_test_string=`eval $prev`
	  export echo_test_string
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
	else
	  # Oops.  We lost completely, so just stick with echo.
	  echo=echo
	fi
      fi
    fi
  fi
fi
fi

# Copy echo and quote the copy suitably for passing to libtool from
# the Makefile, instead of quoting the original, which is used later.
ECHO=$echo
if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
fi




tagnames=${tagnames+${tagnames},}CXX

test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1

# Name of the host.
# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

#
# Initializations.
#
ac_default_prefix=/usr/local
ac_clean_files=
ac_config_libobj_dir=.
LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='PHP'
PACKAGE_TARNAME='php'
PACKAGE_VERSION='8.5.7'
PACKAGE_STRING='PHP 8.5.7'
PACKAGE_BUGREPORT='https://github.com/php/php-src/issues'
PACKAGE_URL='https://www.php.net'

ac_unique_file="main/php_version.h"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stddef.h>
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"

ac_header_c_list=
ac_subst_vars='LTLIBOBJS
LIBTOOL
NMEDIT
DSYMUTIL
STRIP
RANLIB
AR
ECHO
AR_FLAGS
EXTRA_LIBS
orig_libdir
program_suffix
program_prefix
PHP_BUILD_ARCH
PHP_BUILD_COMPILER
PHP_BUILD_PROVIDER
PHP_BUILD_SYSTEM
PHP_UNAME
PHP_LDFLAGS
PHP_VERSION_ID
PHP_VERSION
SAPI_LIBNAME_STATIC
SAPI_LIBNAME_SHARED
PHP_INSTALLED_SAPIS
EXPANDED_PHP_CONFIG_FILE_SCAN_DIR
EXPANDED_PHP_CONFIG_FILE_PATH
EXPANDED_LOCALSTATEDIR
EXPANDED_SYSCONFDIR
EXPANDED_DATADIR
EXPANDED_LIBDIR
EXPANDED_MANDIR
EXPANDED_SBINDIR
EXPANDED_BINDIR
EXPANDED_EXTENSION_DIR
EXPANDED_PEAR_INSTALLDIR
INCLUDE_PATH
EXTENSION_DIR
LIBZIP_LIBS
LIBZIP_CFLAGS
EXSLT_LIBS
EXSLT_CFLAGS
XSL_LIBS
XSL_CFLAGS
EXPAT_LIBS
EXPAT_CFLAGS
LIBURIPARSER_LIBS
LIBURIPARSER_CFLAGS
ARGON2_LIBS
ARGON2_CFLAGS
LIBSODIUM_LIBS
LIBSODIUM_CFLAGS
SNMP_CONFIG
SNMP_LIBS
SNMP_CFLAGS
EDIT_LIBS
EDIT_CFLAGS
PGSQL_LIBS
PGSQL_CFLAGS
PDO_ODBC_LIBS
PDO_ODBC_CFLAGS
FB_CONFIG
CAPSTONE_LIBS
CAPSTONE_CFLAGS
ODBC_LIBS
ODBC_CFLAGS
ONIG_LIBS
ONIG_CFLAGS
SASL_LIBS
SASL_CFLAGS
LDAP_LIBS
LDAP_CFLAGS
HAVE_CXX11
HAVE_CXX17
ICU_LIBS
ICU_CFLAGS
BREW
GMP_LIBS
GMP_CFLAGS
GDLIB_LIBS
GDLIB_CFLAGS
FREETYPE2_LIBS
FREETYPE2_CFLAGS
XPM_LIBS
XPM_CFLAGS
JPEG_LIBS
JPEG_CFLAGS
WEBP_LIBS
WEBP_CFLAGS
AVIF_LIBS
AVIF_CFLAGS
PNG_LIBS
PNG_CFLAGS
FFI_LIBS
FFI_CFLAGS
ENCHANT_LIBS
ENCHANT_CFLAGS
ENCHANT2_LIBS
ENCHANT2_CFLAGS
CURL_FEATURES
CURL_LIBS
CURL_CFLAGS
ZLIB_LIBS
ZLIB_CFLAGS
SQLITE_LIBS
SQLITE_CFLAGS
PCRE2_LIBS
PCRE2_CFLAGS
OPENSSL_LIBS
OPENSSL_CFLAGS
LIBXML_LIBS
LIBXML_CFLAGS
VALGRIND_LIBS
VALGRIND_CFLAGS
ALLOCA
LIBOBJS
PROG_SENDMAIL
CXXCPP
ac_ct_CXX
CXXFLAGS
CXX
php_fpm_prefix
php_fpm_localstatedir
php_fpm_sysconfdir
php_fpm_group
php_fpm_user
SELINUX_LIBS
SELINUX_CFLAGS
APPARMOR_LIBS
APPARMOR_CFLAGS
php_fpm_systemd
SYSTEMD_LIBS
SYSTEMD_CFLAGS
PHP_EMBED_TYPE
SHLIB_DL_SUFFIX_NAME
SHLIB_SUFFIX_NAME
PHP
RE2C
YFLAGS
YACC
BUILD_CC
LN_S
CPP
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
AWK
PHP_EXTRA_VERSION
target_os
target_vendor
target_cpu
target
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
CONFIGURE_OPTIONS
CONFIGURE_COMMAND
SED
EGREP
GREP
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
with_libdir
enable_rpath
enable_re2c_cgoto
enable_
with_apxs2
enable_cli
enable_embed
enable_fpm
with_fpm_user
with_fpm_group
with_fpm_systemd
with_fpm_acl
with_fpm_apparmor
with_fpm_selinux
enable_fuzzer
enable_litespeed
enable_phpdbg
enable_phpdbg_debug
enable_phpdbg_readline
enable_cgi
enable_system_glob
with_valgrind
enable_gcov
enable_debug
enable_debug_assertions
enable_zts
enable_rtld_now
with_layout
with_config_file_path
with_config_file_scan_dir
enable_sigchild
enable_libgcc
enable_short_tags
enable_dmalloc
enable_ipv6
enable_dtrace
enable_fd_setsize
enable_werror
enable_memory_sanitizer
enable_address_sanitizer
enable_undefined_sanitizer
enable_all
with_libxml
with_openssl
with_system_ciphers
with_openssl_legacy_provider
with_openssl_argon2
with_external_pcre
with_pcre_jit
with_sqlite3
with_zlib
enable_bcmath
with_bz2
enable_calendar
enable_ctype
with_curl
enable_dba
with_qdbm
with_gdbm
with_ndbm
with_db4
with_db3
with_db2
with_db1
with_dbm
with_tcadb
with_lmdb
with_cdb
enable_inifile
enable_flatfile
enable_dl_test
enable_dom
with_enchant
enable_exif
with_ffi
enable_fileinfo
enable_filter
enable_ftp
with_ftp_ssl
enable_gd
with_external_gd
with_avif
with_webp
with_jpeg
with_xpm
with_freetype
enable_gd_jis_conv
with_gettext
with_gmp
with_mhash
with_iconv
enable_intl
with_ldap
with_ldap_sasl
enable_mbstring
enable_mbregex
with_mysqli
with_mysql_sock
with_ibm_db2
with_custom_odbc
with_iodbc
with_unixODBC
enable_huge_code_pages
enable_opcache_jit
with_capstone
enable_pcntl
enable_pdo
with_pdo_dblib
with_pdo_firebird
with_pdo_mysql
with_pdo_odbc
with_pdo_pgsql
with_pdo_sqlite
with_pgsql
enable_phar
enable_posix
with_libedit
with_readline
enable_session
with_mm
enable_shmop
enable_simplexml
with_snmp
enable_soap
enable_sockets
with_sodium
with_external_libcrypt
with_password_argon2
enable_sysvmsg
enable_sysvsem
enable_sysvshm
with_tidy
enable_tokenizer
with_external_uriparser
enable_xml
with_expat
enable_xmlreader
enable_xmlwriter
with_xsl
enable_zend_test
with_zip
enable_mysqlnd
with_mysqlnd_ssl
enable_mysqlnd_compression_support
with_pear
enable_fiber_asm
enable_gcc_global_regs
enable_zend_signals
enable_zend_max_execution_timers
enable_shared
enable_static
enable_fast_install
with_gnu_ld
enable_libtool_lock
with_pic
with_tags
'
      ac_precious_vars='build_alias
host_alias
target_alias
PHP_EXTRA_VERSION
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP
SYSTEMD_CFLAGS
SYSTEMD_LIBS
APPARMOR_CFLAGS
APPARMOR_LIBS
SELINUX_CFLAGS
SELINUX_LIBS
CXX
CXXFLAGS
CCC
CXXCPP
VALGRIND_CFLAGS
VALGRIND_LIBS
LIBXML_CFLAGS
LIBXML_LIBS
OPENSSL_CFLAGS
OPENSSL_LIBS
PCRE2_CFLAGS
PCRE2_LIBS
SQLITE_CFLAGS
SQLITE_LIBS
ZLIB_CFLAGS
ZLIB_LIBS
CURL_CFLAGS
CURL_LIBS
CURL_FEATURES
ENCHANT2_CFLAGS
ENCHANT2_LIBS
ENCHANT_CFLAGS
ENCHANT_LIBS
FFI_CFLAGS
FFI_LIBS
PNG_CFLAGS
PNG_LIBS
AVIF_CFLAGS
AVIF_LIBS
WEBP_CFLAGS
WEBP_LIBS
JPEG_CFLAGS
JPEG_LIBS
XPM_CFLAGS
XPM_LIBS
FREETYPE2_CFLAGS
FREETYPE2_LIBS
GDLIB_CFLAGS
GDLIB_LIBS
GMP_CFLAGS
GMP_LIBS
ICU_CFLAGS
ICU_LIBS
LDAP_CFLAGS
LDAP_LIBS
SASL_CFLAGS
SASL_LIBS
ONIG_CFLAGS
ONIG_LIBS
ODBC_CFLAGS
ODBC_LIBS
CAPSTONE_CFLAGS
CAPSTONE_LIBS
PDO_ODBC_CFLAGS
PDO_ODBC_LIBS
PGSQL_CFLAGS
PGSQL_LIBS
EDIT_CFLAGS
EDIT_LIBS
SNMP_CFLAGS
SNMP_LIBS
LIBSODIUM_CFLAGS
LIBSODIUM_LIBS
ARGON2_CFLAGS
ARGON2_LIBS
LIBURIPARSER_CFLAGS
LIBURIPARSER_LIBS
EXPAT_CFLAGS
EXPAT_LIBS
XSL_CFLAGS
XSL_LIBS
EXSLT_CFLAGS
EXSLT_LIBS
LIBZIP_CFLAGS
LIBZIP_LIBS
EXTENSION_DIR
PHP_UNAME
PHP_BUILD_SYSTEM
PHP_BUILD_PROVIDER
PHP_BUILD_COMPILER
PHP_BUILD_ARCH'


# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
ac_unrecognized_opts=
ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

ac_prev=
ac_dashdash=
for ac_option
do
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval $ac_prev=\$ac_option
    ac_prev=
    continue
  fi

  case $ac_option in
  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  *=)   ac_optarg= ;;
  *)    ac_optarg=yes ;;
  esac

  case $ac_dashdash$ac_option in
  --)
    ac_dashdash=yes ;;

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir=$ac_optarg ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$ac_optarg ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file=$ac_optarg ;;

  --config-cache | -C)
    cache_file=config.cache ;;

  -datadir | --datadir | --datadi | --datad)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    datadir=$ac_optarg ;;

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$ac_optarg ;;

  -disable-* | --disable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: '$ac_useropt'"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=no ;;

  -docdir | --docdir | --docdi | --doc | --do)
    ac_prev=docdir ;;
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
    docdir=$ac_optarg ;;

  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
    ac_prev=dvidir ;;
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
    dvidir=$ac_optarg ;;

  -enable-* | --enable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: '$ac_useropt'"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=\$ac_optarg ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix=$ac_optarg ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

  -host | --host | --hos | --ho)
    ac_prev=host_alias ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host_alias=$ac_optarg ;;

  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
    ac_prev=htmldir ;;
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  | --ht=*)
    htmldir=$ac_optarg ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir=$ac_optarg ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir=$ac_optarg ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir=$ac_optarg ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir=$ac_optarg ;;

  -localedir | --localedir | --localedi | --localed | --locale)
    ac_prev=localedir ;;
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
    localedir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst | --locals)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    localstatedir=$ac_optarg ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir=$ac_optarg ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c | -n)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir=$ac_optarg ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix=$ac_optarg ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix=$ac_optarg ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix=$ac_optarg ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name=$ac_optarg ;;

  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
    ac_prev=pdfdir ;;
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
    pdfdir=$ac_optarg ;;

  -psdir | --psdir | --psdi | --psd | --ps)
    ac_prev=psdir ;;
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
    psdir=$ac_optarg ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -runstatedir | --runstatedir | --runstatedi | --runstated \
  | --runstate | --runstat | --runsta | --runst | --runs \
  | --run | --ru | --r)
    ac_prev=runstatedir ;;
  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
  | --run=* | --ru=* | --r=*)
    runstatedir=$ac_optarg ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir=$ac_optarg ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir=$ac_optarg ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site=$ac_optarg ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir=$ac_optarg ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir=$ac_optarg ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target_alias ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target_alias=$ac_optarg ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: '$ac_useropt'"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=\$ac_optarg ;;

  -without-* | --without-*)
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: '$ac_useropt'"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=no ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes=$ac_optarg ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries=$ac_optarg ;;

  -*) as_fn_error $? "unrecognized option: '$ac_option'
Try '$0 --help' for more information"
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    case $ac_envvar in #(
      '' | [0-9]* | *[!_$as_cr_alnum]* )
      as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
    esac
    eval $ac_envvar=\$ac_optarg
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
    ;;

  esac
done

if test -n "$ac_prev"; then
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  as_fn_error $? "missing argument to $ac_option"
fi

if test -n "$ac_unrecognized_opts"; then
  case $enable_option_checking in
    no) ;;
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  esac
fi

# Check all directory arguments for consistency.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir runstatedir
do
  eval ac_val=\$$ac_var
  # Remove trailing slashes.
  case $ac_val in
    */ )
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
      eval $ac_var=\$ac_val;;
  esac
  # Be sure to have absolute directory names.
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done

# There might be people who depend on the old broken behavior: '$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: To remove some day.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  as_fn_error $? "pwd does not report name of working directory"


# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then the parent directory.
  ac_confdir=`$as_dirname -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_myself" : 'X\(//\)[^/]' \| \
	 X"$as_myself" : 'X\(//\)$' \| \
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$as_myself" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  srcdir=$ac_confdir
  if test ! -r "$srcdir/$ac_unique_file"; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r "$srcdir/$ac_unique_file"; then
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
	pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
  srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_env_${ac_var}_value=\$${ac_var}
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
done

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
'configure' configures PHP 8.5.7 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print 'checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for '--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or '..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, 'make install' will install all the files in
'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than '$ac_default_prefix' using '--prefix',
for instance '--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/php]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of PHP 8.5.7:";;
   esac
  cat <<\_ACEOF

Optional Features and Packages:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-libdir=NAME      Look for libraries in .../NAME rather than .../lib
  --disable-rpath         Disable passing additional runtime library search
                          paths
  --enable-re2c-cgoto     Enable re2c -g flag to optimize conditional jumps
                          using computed goto extension, if supported by the
                          compiler

SAPI modules:
  --with-apxs2[=FILE]     Build shared Apache 2 handler module. FILE is the
                          optional pathname to the Apache apxs tool [apxs]
  --disable-cli           Disable building CLI version of PHP (this forces
                          --without-pear)
  --enable-embed[=TYPE]   Enable building of embedded SAPI library TYPE is
                          either 'shared' or 'static'. [TYPE=shared]
  --enable-fpm            Enable building of the fpm SAPI executable
  --with-fpm-user[=USER]  Set the user for php-fpm to run as. (default:
                          nobody)
  --with-fpm-group[=GRP]  Set the group for php-fpm to run as. For a system
                          user, this should usually be set to match the fpm
                          username (default: nobody)
  --with-fpm-systemd      Activate systemd integration
  --with-fpm-acl          Use POSIX Access Control Lists
  --with-fpm-apparmor     Support AppArmor confinement through libapparmor
  --with-fpm-selinux      Support SELinux policy library
  --enable-fuzzer         Build PHP as Clang fuzzing test module (for
                          developers)
  --enable-litespeed      Build PHP as litespeed module
  --disable-phpdbg        Disable building of phpdbg
  --enable-phpdbg-debug   Build phpdbg in debug mode to enable additional
                          diagnostic output for developing and troubleshooting
                          phpdbg itself
  --enable-phpdbg-readline
                          Enable readline support in phpdbg (depends on static
                          ext/readline)
  --disable-cgi           Disable building CGI version of PHP
  --enable-system-glob    Use the system glob function instead of the PHP
                          provided replacement.
  --with-valgrind         Enable Valgrind support

General settings:
  --enable-gcov           Enable GCOV code coverage - FOR DEVELOPERS ONLY!!
  --enable-debug          Compile with debugging symbols
  --enable-debug-assertions
                          Compile with debug assertions even in release mode
  --enable-zts            Enable thread safety
  --enable-rtld-now       Use dlopen with RTLD_NOW instead of RTLD_LAZY
  --with-layout=TYPE      Set how installed files will be laid out. Type can
                          be either PHP or GNU [PHP]
  --with-config-file-path=PATH
                          Set the path in which to look for php.ini
                          [PREFIX/lib]
  --with-config-file-scan-dir=PATH
                          Set the path where to scan for configuration files
  --enable-sigchild       Enable PHP's own SIGCHLD handler
  --enable-libgcc         Enable explicitly linking against libgcc
  --disable-short-tags    Disable the short-form <? start tag by default
  --enable-dmalloc        Enable dmalloc
  --disable-ipv6          Disable IPv6 support
  --enable-dtrace         Enable DTrace support
  --enable-fd-setsize     Set size of descriptor sets
  --enable-werror         Enable -Werror
  --enable-memory-sanitizer
                          Enable memory sanitizer (clang only)
  --enable-address-sanitizer
                          Enable address sanitizer
  --enable-undefined-sanitizer
                          Enable undefined sanitizer

Extensions:
  --with-EXTENSION=[shared[,PATH]]

    NOTE: Not all extensions can be built as 'shared'.

    Example: --with-foobar=shared,/usr/local/foobar/

      o Builds the foobar extension as shared extension.
      o foobar package install prefix is /usr/local/foobar/

  --disable-all           Disable all extensions which are enabled by default
  --without-libxml        Build without LIBXML support
  --with-openssl          Include OpenSSL support (requires OpenSSL >= 1.1.1)
  --with-system-ciphers   OPENSSL: Use system default cipher list instead of
                          hardcoded value
  --with-openssl-legacy-provider
                          OPENSSL: Load legacy algorithm provider in addition
                          to default provider
  --with-openssl-argon2   OPENSSL: Enable argon2 password hashing
  --with-external-pcre    Use external library for PCRE support
  --without-pcre-jit      Disable PCRE JIT functionality
  --without-sqlite3       Do not include SQLite3 support.
  --with-zlib             Include ZLIB support (requires zlib library)
  --enable-bcmath         Enable bc style precision math functions
  --with-bz2[=DIR]        Include BZip2 support
  --enable-calendar       Enable support for calendar conversion
  --disable-ctype         Disable ctype functions
  --with-curl             Include cURL support
  --enable-dba            Build DBA with bundled modules. To build shared DBA
                          extension use --enable-dba=shared
  --with-qdbm[=DIR]       DBA: QDBM support
  --with-gdbm[=DIR]       DBA: GDBM support
  --with-ndbm[=DIR]       DBA: NDBM support
  --with-db4[=DIR]        DBA: Oracle Berkeley DB 4.x or 5.x support
  --with-db3[=DIR]        DBA: Oracle Berkeley DB 3.x support
  --with-db2[=DIR]        DBA: Oracle Berkeley DB 2.x support
  --with-db1[=DIR]        DBA: Oracle Berkeley DB 1.x support/emulation
  --with-dbm[=DIR]        DBA: DBM support
  --with-tcadb[=DIR]      DBA: Tokyo Cabinet abstract DB support
  --with-lmdb[=DIR]       DBA: Lightning memory-mapped database support
  --without-cdb[=DIR]     DBA: CDB support (bundled)
  --disable-inifile       DBA: INI support (bundled)
  --disable-flatfile      DBA: FlatFile support (bundled)
  --enable-dl-test        Enable dl_test extension
  --disable-dom           Disable DOM support
  --with-enchant          Include Enchant support
  --enable-exif           Enable EXIF (metadata from images) support
  --with-ffi              Include FFI support
  --disable-fileinfo      Disable fileinfo support
  --disable-filter        Disable input filter support
  --enable-ftp            Enable FTP support
  --with-ftp-ssl          Explicitly enable FTP over SSL support when building
                          without openssl extension or when using phpize. If
                          the openssl extension is enabled at the configure
                          step (--with-openssl), FTP-SSL is enabled implicitly
                          regardless of this option.
  --enable-gd             Include GD support
  --with-external-gd      Use external libgd
  --with-avif             GD: Enable AVIF support (only for bundled libgd)
  --with-webp             GD: Enable WEBP support (only for bundled libgd)
  --with-jpeg             GD: Enable JPEG support (only for bundled libgd)
  --with-xpm              GD: Enable XPM support (only for bundled libgd)
  --with-freetype         GD: Enable FreeType 2 support (only for bundled
                          libgd)
  --enable-gd-jis-conv    GD: Enable JIS-mapped Japanese font support (only
                          for bundled libgd)
  --with-gettext[=DIR]    Include GNU gettext support
  --with-gmp[=DIR]        Include GNU MP support. Use PKG_CONFIG_PATH (or
                          GMP_CFLAGS and GMP_LIBS) environment variables, or
                          alternatively the optional DIR argument to customize
                          where to look for the GNU MP library.
  --with-mhash            Include mhash support
  --without-iconv[=DIR]   Exclude iconv support
  --enable-intl           Enable internationalization support
  --with-ldap[=DIR]       Include LDAP support
  --with-ldap-sasl        LDAP: Build with Cyrus SASL support
  --enable-mbstring       Enable multibyte string support
  --disable-mbregex       MBSTRING: Disable multibyte regex support
  --with-mysqli           Include MySQLi support. The MySQL native driver will
                          be used
  --with-mysql-sock[=SOCKPATH]
                          MySQLi/PDO_MYSQL: Location of the MySQL Unix socket
                          pointer. If unspecified, the default locations are
                          searched
  --with-ibm-db2[=DIR]    Include IBM DB2 support [/home/db2inst1/sqllib]
  --with-custom-odbc[=DIR]
                          Include user defined ODBC support. DIR is ODBC
                          install base directory [/usr/local]. Make sure to
                          define CUSTOM_ODBC_LIBS and have some odbc.h in your
                          include dirs. For example, you should define
                          following for Sybase SQL Anywhere 5.5.00 on QNX,
                          prior to running this configure script:
                          CPPFLAGS="-DODBC_QNX -DSQLANY_BUG" LDFLAGS=-lunix
                          CUSTOM_ODBC_LIBS="-ldblib -lodbc"
  --with-iodbc            Include iODBC support
  --with-unixODBC[=DIR]   Include unixODBC support. Use PKG_CONFIG_PATH (or
                          ODBC_CFLAGS and ODBC_LIBS) environment variables, or
                          alternatively the optional DIR argument to customize
                          where to look for the unixODBC library.
  --disable-huge-code-pages
                          Disable copying PHP CODE pages into HUGE PAGES
  --disable-opcache-jit   Disable JIT
  --with-capstone         Support opcache JIT disassembly through Capstone
  --enable-pcntl          Enable pcntl support (CLI/CGI only)
  --disable-pdo           Disable PHP Data Objects support
  --with-pdo-dblib[=DIR]  PDO: DBLIB-DB support. DIR is the FreeTDS home
                          directory
  --with-pdo-firebird[=DIR]
                          PDO: Firebird support. DIR is the Firebird base
                          install directory [/opt/firebird]
  --with-pdo-mysql[=DIR]  PDO: MySQL support. DIR is the MySQL base directory.
                          If no value or mysqlnd is passed as DIR, the MySQL
                          native driver will be used
  --with-pdo-odbc=flavour,dir
                          PDO: Support for 'flavour' ODBC driver. The
                          'flavour' part determines what driver or driver
                          manager to use; it can be either ibm-db2, iODBC,
                          unixODBC, or generic. The include and lib dirs are
                          looked for under 'dir'. You may attempt to use an
                          otherwise unsupported driver using the 'generic'
                          flavour. The syntax for generic ODBC support is:
                          --with-pdo-odbc=generic,dir,libname,ldflags,cflags.
                          When built as 'shared' the extension filename is
                          always 'pdo_odbc.so'. For unixODBC and iODBC, the
                          'dir' part is ignored and can be omitted, as
                          pkg-config will be searched instead. For ibm-db2, it
                          will search for the DB2 driver at that path.
  --with-pdo-pgsql[=DIR]  PDO: PostgreSQL support. Optional DIR is the
                          PostgreSQL base install directory or the path to
                          pg_config. Also, the PGSQL_CFLAGS and PGSQL_LIBS
                          environment variables can be used instead of the DIR
                          argument to customize the libpq paths.
  --without-pdo-sqlite    PDO: sqlite 3 support.
  --with-pgsql[=DIR]      Include PostgreSQL support. Optional DIR is the
                          PostgreSQL base install directory or the path to
                          pg_config. Also, the PGSQL_CFLAGS and PGSQL_LIBS
                          environment variables can be used instead of the DIR
                          argument to customize the libpq paths.
  --disable-phar          Disable phar support
  --disable-posix         Disable POSIX-like functions
  --with-libedit          Include libedit readline replacement (CLI/CGI only)
  --with-readline[=DIR]   Include readline support (CLI/CGI only)
  --disable-session       Disable session support
  --with-mm[=DIR]         SESSION: Include mm support for session storage
  --enable-shmop          Enable shmop support
  --disable-simplexml     Disable SimpleXML support
  --with-snmp[=DIR]       Include SNMP support. Use PKG_CONFIG_PATH (or
                          SNMP_CFLAGS and SNMP_LIBS) environment variables, or
                          alternatively the optional DIR argument to customize
                          where to look for the net-snmp-config utility of the
                          NET-SNMP library.
  --enable-soap           Enable SOAP support
  --enable-sockets        Enable sockets support
  --with-sodium           Include sodium support
  --with-external-libcrypt
                          Use external libcrypt or libxcrypt
  --with-password-argon2  Include Argon2 support in password_*
  --enable-sysvmsg        Enable sysvmsg support
  --enable-sysvsem        Enable System V semaphore support
  --enable-sysvshm        Enable the System V shared memory support
  --with-tidy[=DIR]       Include TIDY support
  --disable-tokenizer     Disable tokenizer support
  --with-external-uriparser
                          Use external/system liburiparser
  --disable-xml           Disable XML support
  --with-expat            XML: use Expat library instead of libxml2 in the xml
                          extension
  --disable-xmlreader     Disable XMLReader support
  --disable-xmlwriter     Disable XMLWriter support
  --with-xsl              Build with XSL support
  --enable-zend-test      Enable zend_test extension
  --with-zip              Include Zip read/write support
  --enable-mysqlnd        Enable mysqlnd explicitly, will be done implicitly
                          when required by other extensions
  --with-mysqlnd-ssl      Explicitly enable extended SSL support in the
                          mysqlnd extension when building without openssl
                          extension or when using phpize. If the openssl
                          extension is enabled at the configure step
                          (--with-openssl), extended SSL is enabled implicitly
                          regardless of this option.
  --disable-mysqlnd-compression-support
                          Disable support for the MySQL compressed protocol in
                          mysqlnd

PEAR:
  --with-pear[=DIR]       Install PEAR in DIR [PREFIX/lib/php]

Zend:
  --disable-fiber-asm     Disable the use of boost fiber assembly files
  --disable-gcc-global-regs
                          Disable GCC global register variables
  --disable-zend-signals  Disable Zend signal handling
  --enable-zend-max-execution-timers
                          Enable Zend max execution timers; when building with
                          thread safety (--enable-zts), they are automatically
                          enabled by default based on the system support

Libtool:
  --enable-shared=PKGS    Build shared libraries default=yes
  --enable-static=PKGS    Build static libraries default=yes
  --enable-fast-install=PKGS
                          Optimize for fast installation default=yes
  --with-gnu-ld           Assume the C compiler uses GNU ld default=no
  --disable-libtool-lock  Avoid locking (might break parallel builds)
  --with-pic              Try to use only PIC/non-PIC objects default=use both
  --with-tags=TAGS        Include additional configurations automatic


Some influential environment variables:
  PHP_EXTRA_VERSION
              Extra PHP version label suffix, e.g. '-dev', 'rc1', '-acme'
  PKG_CONFIG  path to pkg-config utility
  PKG_CONFIG_PATH
              directories to add to pkg-config's search path
  PKG_CONFIG_LIBDIR
              path overriding pkg-config's built-in search path
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  SYSTEMD_CFLAGS
              C compiler flags for SYSTEMD, overriding pkg-config
  SYSTEMD_LIBS
              linker flags for SYSTEMD, overriding pkg-config
  APPARMOR_CFLAGS
              C compiler flags for APPARMOR, overriding pkg-config
  APPARMOR_LIBS
              linker flags for APPARMOR, overriding pkg-config
  SELINUX_CFLAGS
              C compiler flags for SELINUX, overriding pkg-config
  SELINUX_LIBS
              linker flags for SELINUX, overriding pkg-config
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      C++ preprocessor
  VALGRIND_CFLAGS
              C compiler flags for VALGRIND, overriding pkg-config
  VALGRIND_LIBS
              linker flags for VALGRIND, overriding pkg-config
  LIBXML_CFLAGS
              C compiler flags for LIBXML, overriding pkg-config
  LIBXML_LIBS linker flags for LIBXML, overriding pkg-config
  OPENSSL_CFLAGS
              C compiler flags for OPENSSL, overriding pkg-config
  OPENSSL_LIBS
              linker flags for OPENSSL, overriding pkg-config
  PCRE2_CFLAGS
              C compiler flags for PCRE2, overriding pkg-config
  PCRE2_LIBS  linker flags for PCRE2, overriding pkg-config
  SQLITE_CFLAGS
              C compiler flags for SQLITE, overriding pkg-config
  SQLITE_LIBS linker flags for SQLITE, overriding pkg-config
  ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
  ZLIB_LIBS   linker flags for ZLIB, overriding pkg-config
  CURL_CFLAGS C compiler flags for CURL, overriding pkg-config
  CURL_LIBS   linker flags for CURL, overriding pkg-config
  CURL_FEATURES
              value of supported_features for libcurl, overriding pkg-config
  ENCHANT2_CFLAGS
              C compiler flags for ENCHANT2, overriding pkg-config
  ENCHANT2_LIBS
              linker flags for ENCHANT2, overriding pkg-config
  ENCHANT_CFLAGS
              C compiler flags for ENCHANT, overriding pkg-config
  ENCHANT_LIBS
              linker flags for ENCHANT, overriding pkg-config
  FFI_CFLAGS  C compiler flags for FFI, overriding pkg-config
  FFI_LIBS    linker flags for FFI, overriding pkg-config
  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
  PNG_LIBS    linker flags for PNG, overriding pkg-config
  AVIF_CFLAGS C compiler flags for AVIF, overriding pkg-config
  AVIF_LIBS   linker flags for AVIF, overriding pkg-config
  WEBP_CFLAGS C compiler flags for WEBP, overriding pkg-config
  WEBP_LIBS   linker flags for WEBP, overriding pkg-config
  JPEG_CFLAGS C compiler flags for JPEG, overriding pkg-config
  JPEG_LIBS   linker flags for JPEG, overriding pkg-config
  XPM_CFLAGS  C compiler flags for XPM, overriding pkg-config
  XPM_LIBS    linker flags for XPM, overriding pkg-config
  FREETYPE2_CFLAGS
              C compiler flags for FREETYPE2, overriding pkg-config
  FREETYPE2_LIBS
              linker flags for FREETYPE2, overriding pkg-config
  GDLIB_CFLAGS
              C compiler flags for GDLIB, overriding pkg-config
  GDLIB_LIBS  linker flags for GDLIB, overriding pkg-config
  GMP_CFLAGS  C compiler flags for GMP, overriding pkg-config
  GMP_LIBS    linker flags for GMP, overriding pkg-config
  ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
  ICU_LIBS    linker flags for ICU, overriding pkg-config
  LDAP_CFLAGS C compiler flags for LDAP, overriding pkg-config
  LDAP_LIBS   linker flags for LDAP, overriding pkg-config
  SASL_CFLAGS C compiler flags for SASL, overriding pkg-config
  SASL_LIBS   linker flags for SASL, overriding pkg-config
  ONIG_CFLAGS C compiler flags for ONIG, overriding pkg-config
  ONIG_LIBS   linker flags for ONIG, overriding pkg-config
  ODBC_CFLAGS C compiler flags for ODBC, overriding pkg-config
  ODBC_LIBS   linker flags for ODBC, overriding pkg-config
  CAPSTONE_CFLAGS
              C compiler flags for CAPSTONE, overriding pkg-config
  CAPSTONE_LIBS
              linker flags for CAPSTONE, overriding pkg-config
  PDO_ODBC_CFLAGS
              C compiler flags for PDO_ODBC, overriding pkg-config
  PDO_ODBC_LIBS
              linker flags for PDO_ODBC, overriding pkg-config
  PGSQL_CFLAGS
              C compiler flags for PGSQL, overriding pkg-config
  PGSQL_LIBS  linker flags for PGSQL, overriding pkg-config
  EDIT_CFLAGS C compiler flags for EDIT, overriding pkg-config
  EDIT_LIBS   linker flags for EDIT, overriding pkg-config
  SNMP_CFLAGS C compiler flags for SNMP, overriding pkg-config
  SNMP_LIBS   linker flags for SNMP, overriding pkg-config
  LIBSODIUM_CFLAGS
              C compiler flags for LIBSODIUM, overriding pkg-config
  LIBSODIUM_LIBS
              linker flags for LIBSODIUM, overriding pkg-config
  ARGON2_CFLAGS
              C compiler flags for ARGON2, overriding pkg-config
  ARGON2_LIBS linker flags for ARGON2, overriding pkg-config
  LIBURIPARSER_CFLAGS
              C compiler flags for LIBURIPARSER, overriding pkg-config
  LIBURIPARSER_LIBS
              linker flags for LIBURIPARSER, overriding pkg-config
  EXPAT_CFLAGS
              C compiler flags for EXPAT, overriding pkg-config
  EXPAT_LIBS  linker flags for EXPAT, overriding pkg-config
  XSL_CFLAGS  C compiler flags for XSL, overriding pkg-config
  XSL_LIBS    linker flags for XSL, overriding pkg-config
  EXSLT_CFLAGS
              C compiler flags for EXSLT, overriding pkg-config
  EXSLT_LIBS  linker flags for EXSLT, overriding pkg-config
  LIBZIP_CFLAGS
              C compiler flags for LIBZIP, overriding pkg-config
  LIBZIP_LIBS linker flags for LIBZIP, overriding pkg-config
  EXTENSION_DIR
              Default directory for dynamically loadable PHP extensions. If
              left empty, it is determined automatically. Can be overridden
              using the PHP 'extension_dir' INI directive.
  PHP_UNAME   System information (defaults to the 'uname -a' output)
  PHP_BUILD_SYSTEM
              The system that PHP was built on (defaults to the 'uname -a'
              output)
  PHP_BUILD_PROVIDER
              The PHP build provider information
  PHP_BUILD_COMPILER
              Information about the compiler used for the PHP build
  PHP_BUILD_ARCH
              The build architecture

Use these variables to override the choices made by 'configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <https://github.com/php/php-src/issues>.
PHP home page: <https://www.php.net>.
_ACEOF
ac_status=$?
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d "$ac_dir" ||
      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
      continue
    ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix

    cd "$ac_dir" || { ac_status=$?; continue; }
    # Check for configure.gnu first; this name is used for a wrapper for
    # Metaconfig's "Configure" on case-insensitive file systems.
    if test -f "$ac_srcdir/configure.gnu"; then
      echo &&
      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
    elif test -f "$ac_srcdir/configure"; then
      echo &&
      $SHELL "$ac_srcdir/configure" --help=recursive
    else
      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi || ac_status=$?
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
PHP configure 8.5.7
generated by GNU Autoconf 2.72

Copyright (C) 2023 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi

## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##

# ac_fn_c_try_compile LINENO
# --------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else case e in #(
  e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1 ;;
esac
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_compile

# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_cpp ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } > conftest.i && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }
then :
  ac_retval=0
else case e in #(
  e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_retval=1 ;;
esac
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_cpp

# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$3=yes"
else case e in #(
  e) eval "$3=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_compile

# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }
then :
  ac_retval=0
else case e in #(
  e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1 ;;
esac
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_link

# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $2 innocuous_$2

/* System header to define __stub macros and hopefully few prototypes,
   which can conflict with char $2 (void); below.  */

#include <limits.h>
#undef $2

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char $2 (void);
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined __stub_$2 || defined __stub___$2
choke me
#endif

int
main (void)
{
return $2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$3=yes"
else case e in #(
  e) eval "$3=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_func

# ac_fn_c_try_run LINENO
# ----------------------
# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
# executables *can* be run.
ac_fn_c_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }
then :
  ac_retval=0
else case e in #(
  e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
       printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status ;;
esac
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_run

# ac_fn_cxx_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else case e in #(
  e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1 ;;
esac
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_compile

# ac_fn_cxx_try_cpp LINENO
# ------------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_cpp ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } > conftest.i && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }
then :
  ac_retval=0
else case e in #(
  e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_retval=1 ;;
esac
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_cpp

# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
# ------------------------------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
ac_fn_check_decl ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  as_decl_name=`echo $2|sed 's/ *(.*//'`
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
printf %s "checking whether $as_decl_name is declared... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
  eval ac_save_FLAGS=\$$6
  as_fn_append $6 " $5"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
  (void) $as_decl_use;
#else
  (void) $as_decl_name;
#endif
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$3=yes"
else case e in #(
  e) eval "$3=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  eval $6=\$ac_save_FLAGS
 ;;
esac
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_check_decl

# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
# ----------------------------------------------------
# Tries to find if the field MEMBER exists in type AGGR, after including
# INCLUDES, setting cache variable VAR accordingly.
ac_fn_c_check_member ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
printf %s "checking for $2.$3... " >&6; }
if eval test \${$4+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$5
int
main (void)
{
static $2 ac_aggr;
if (ac_aggr.$3)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$4=yes"
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$5
int
main (void)
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$4=yes"
else case e in #(
  e) eval "$4=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
eval ac_res=\$$4
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_member

# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_check_type ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) eval "$3=no"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
if (sizeof ($2))
	 return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
if (sizeof (($2)))
	    return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

else case e in #(
  e) eval "$3=yes" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_type

# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
# INCLUDES, setting VAR accordingly. Returns whether the value could be
# computed
ac_fn_c_compute_int ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if test "$cross_compiling" = yes; then
    # Depending upon the size, compute the lo and hi bounds.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_lo=0 ac_mid=0
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_hi=$ac_mid; break
else case e in #(
  e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
			if test $ac_lo -le $ac_mid; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  done
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_hi=-1 ac_mid=-1
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_lo=$ac_mid; break
else case e in #(
  e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
			if test $ac_mid -le $ac_hi; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  done
else case e in #(
  e) ac_lo= ac_hi= ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_hi=$ac_mid
else case e in #(
  e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
'') ac_retval=1 ;;
esac
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
static long int longval (void) { return $2; }
static unsigned long int ulongval (void) { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (($2) < 0)
    {
      long int i = longval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%ld", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%lu", i);
    }
  /* Do not output a trailing newline, as this causes \r\n confusion
     on some platforms.  */
  return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else case e in #(
  e) ac_retval=1 ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
rm -f conftest.val

  fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_compute_int
ac_configure_args_raw=
for ac_arg
do
  case $ac_arg in
  *\'*)
    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  esac
  as_fn_append ac_configure_args_raw " '$ac_arg'"
done

case $ac_configure_args_raw in
  *$as_nl*)
    ac_safe_unquote= ;;
  *)
    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
    ac_unsafe_a="$ac_unsafe_z#~"
    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
esac

cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by PHP $as_me 8.5.7, which was
generated by GNU Autoconf 2.72.  Invocation command line was

  $ $0$ac_configure_args_raw

_ACEOF
exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    printf "%s\n" "PATH: $as_dir"
  done
IFS=$as_save_IFS

} >&5

cat >&5 <<_ACEOF


## ----------- ##
## Core tests. ##
## ----------- ##

_ACEOF


# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_must_keep_next=false
for ac_pass in 1 2
do
  for ac_arg
  do
    case $ac_arg in
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    | -silent | --silent | --silen | --sile | --sil)
      continue ;;
    *\'*)
      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
    2)
      as_fn_append ac_configure_args1 " '$ac_arg'"
      if test $ac_must_keep_next = true; then
	ac_must_keep_next=false # Got value, back to normal.
      else
	case $ac_arg in
	  *=* | --config-cache | -C | -disable-* | --disable-* \
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
	  | -with-* | --with-* | -without-* | --without-* | --x)
	    case "$ac_configure_args0 " in
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
	    esac
	    ;;
	  -* ) ac_must_keep_next=true ;;
	esac
      fi
      as_fn_append ac_configure_args " '$ac_arg'"
      ;;
    esac
  done
done
{ ac_configure_args0=; unset ac_configure_args0;}
{ ac_configure_args1=; unset ac_configure_args1;}

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
  # Sanitize IFS.
  IFS=" ""	$as_nl"
  # Save into config.log some information that might help in debugging.
  {
    echo

    printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
    echo
    # The following way of writing the cache mishandles newlines in values,
(
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done
  (set) 2>&1 |
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      sed -n \
	"s/'\''/'\''\\\\'\'''\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
      ;; #(
    *)
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
)
    echo

    printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=\$$ac_var
      case $ac_val in
      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      printf "%s\n" "$ac_var='\''$ac_val'\''"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=\$$ac_var
	case $ac_val in
	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	printf "%s\n" "$ac_var='\''$ac_val'\''"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      printf "%s\n" "$as_me: caught signal $ac_signal"
    printf "%s\n" "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
    exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h

printf "%s\n" "/* confdefs.h */" > confdefs.h

# Predefined preprocessor variables.

printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h


# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
if test -n "$CONFIG_SITE"; then
  ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi

for ac_site_file in $ac_site_files
do
  case $ac_site_file in #(
  */*) :
     ;; #(
  *) :
    ac_site_file=./$ac_site_file ;;
esac
  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$ac_site_file" >&5
    . "$ac_site_file" \
      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See 'config.log' for more details" "$LINENO" 5; }
  fi
done

if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special files
  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . "$cache_file";;
      *)                      . "./$cache_file";;
    esac
  fi
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Test code for whether the C compiler supports C89 (global declarations)
ac_c_conftest_c89_globals='
/* Does the compiler advertise C89 conformance?
   Do not test the value of __STDC__, because some compilers set it to 0
   while being otherwise adequately conformant. */
#if !defined __STDC__
# error "Compiler does not advertise C89 conformance"
#endif

#include <stddef.h>
#include <stdarg.h>
struct stat;
/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
struct buf { int x; };
struct buf * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (char **p, int i)
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}

/* C89 style stringification. */
#define noexpand_stringify(a) #a
const char *stringified = noexpand_stringify(arbitrary+token=sequence);

/* C89 style token pasting.  Exercises some of the corner cases that
   e.g. old MSVC gets wrong, but not very hard. */
#define noexpand_concat(a,b) a##b
#define expand_concat(a,b) noexpand_concat(a,b)
extern int vA;
extern int vbee;
#define aye A
#define bee B
int *pvA = &expand_concat(v,aye);
int *pvbee = &noexpand_concat(v,bee);

/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
   function prototypes and stuff, but not \xHH hex character constants.
   These do not provoke an error unfortunately, instead are silently treated
   as an "x".  The following induces an error, until -std is added to get
   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
   array size at least.  It is necessary to write \x00 == 0 to get something
   that is true only with -std.  */
int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) '\''x'\''
int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];

int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
               int, int);'

# Test code for whether the C compiler supports C89 (body of main).
ac_c_conftest_c89_main='
ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
'

# Test code for whether the C compiler supports C99 (global declarations)
ac_c_conftest_c99_globals='
/* Does the compiler advertise C99 conformance? */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
# error "Compiler does not advertise C99 conformance"
#endif

// See if C++-style comments work.

#include <stdbool.h>
extern int puts (const char *);
extern int printf (const char *, ...);
extern int dprintf (int, const char *, ...);
extern void *malloc (size_t);
extern void free (void *);

// Check varargs macros.  These examples are taken from C99 6.10.3.5.
// dprintf is used instead of fprintf to avoid needing to declare
// FILE and stderr.
#define debug(...) dprintf (2, __VA_ARGS__)
#define showlist(...) puts (#__VA_ARGS__)
#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
static void
test_varargs_macros (void)
{
  int x = 1234;
  int y = 5678;
  debug ("Flag");
  debug ("X = %d\n", x);
  showlist (The first, second, and third items.);
  report (x>y, "x is %d but y is %d", x, y);
}

// Check long long types.
#define BIG64 18446744073709551615ull
#define BIG32 4294967295ul
#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
#if !BIG_OK
  #error "your preprocessor is broken"
#endif
#if BIG_OK
#else
  #error "your preprocessor is broken"
#endif
static long long int bignum = -9223372036854775807LL;
static unsigned long long int ubignum = BIG64;

struct incomplete_array
{
  int datasize;
  double data[];
};

struct named_init {
  int number;
  const wchar_t *name;
  double average;
};

typedef const char *ccp;

static inline int
test_restrict (ccp restrict text)
{
  // Iterate through items via the restricted pointer.
  // Also check for declarations in for loops.
  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
    continue;
  return 0;
}

// Check varargs and va_copy.
static bool
test_varargs (const char *format, ...)
{
  va_list args;
  va_start (args, format);
  va_list args_copy;
  va_copy (args_copy, args);

  const char *str = "";
  int number = 0;
  float fnumber = 0;

  while (*format)
    {
      switch (*format++)
	{
	case '\''s'\'': // string
	  str = va_arg (args_copy, const char *);
	  break;
	case '\''d'\'': // int
	  number = va_arg (args_copy, int);
	  break;
	case '\''f'\'': // float
	  fnumber = va_arg (args_copy, double);
	  break;
	default:
	  break;
	}
    }
  va_end (args_copy);
  va_end (args);

  return *str && number && fnumber;
}
'

# Test code for whether the C compiler supports C99 (body of main).
ac_c_conftest_c99_main='
  // Check bool.
  _Bool success = false;
  success |= (argc != 0);

  // Check restrict.
  if (test_restrict ("String literal") == 0)
    success = true;
  char *restrict newvar = "Another string";

  // Check varargs.
  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
  test_varargs_macros ();

  // Check flexible array members.
  struct incomplete_array *ia =
    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
  ia->datasize = 10;
  for (int i = 0; i < ia->datasize; ++i)
    ia->data[i] = i * 1.234;
  // Work around memory leak warnings.
  free (ia);

  // Check named initializers.
  struct named_init ni = {
    .number = 34,
    .name = L"Test wide string",
    .average = 543.34343,
  };

  ni.number = 58;

  int dynamic_array[ni.number];
  dynamic_array[0] = argv[0][0];
  dynamic_array[ni.number - 1] = 543;

  // work around unused variable warnings
  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
	 || dynamic_array[ni.number - 1] != 543);
'

# Test code for whether the C compiler supports C11 (global declarations)
ac_c_conftest_c11_globals='
/* Does the compiler advertise C11 conformance? */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
# error "Compiler does not advertise C11 conformance"
#endif

// Check _Alignas.
char _Alignas (double) aligned_as_double;
char _Alignas (0) no_special_alignment;
extern char aligned_as_int;
char _Alignas (0) _Alignas (int) aligned_as_int;

// Check _Alignof.
enum
{
  int_alignment = _Alignof (int),
  int_array_alignment = _Alignof (int[100]),
  char_alignment = _Alignof (char)
};
_Static_assert (0 < -_Alignof (int), "_Alignof is signed");

// Check _Noreturn.
int _Noreturn does_not_return (void) { for (;;) continue; }

// Check _Static_assert.
struct test_static_assert
{
  int x;
  _Static_assert (sizeof (int) <= sizeof (long int),
                  "_Static_assert does not work in struct");
  long int y;
};

// Check UTF-8 literals.
#define u8 syntax error!
char const utf8_literal[] = u8"happens to be ASCII" "another string";

// Check duplicate typedefs.
typedef long *long_ptr;
typedef long int *long_ptr;
typedef long_ptr long_ptr;

// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
struct anonymous
{
  union {
    struct { int i; int j; };
    struct { int k; long int l; } w;
  };
  int m;
} v1;
'

# Test code for whether the C compiler supports C11 (body of main).
ac_c_conftest_c11_main='
  _Static_assert ((offsetof (struct anonymous, i)
		   == offsetof (struct anonymous, w.k)),
		  "Anonymous union alignment botch");
  v1.i = 2;
  v1.w.k = 5;
  ok |= v1.i != 5;
'

# Test code for whether the C compiler supports C11 (complete).
ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
${ac_c_conftest_c99_globals}
${ac_c_conftest_c11_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  ${ac_c_conftest_c99_main}
  ${ac_c_conftest_c11_main}
  return ok;
}
"

# Test code for whether the C compiler supports C99 (complete).
ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
${ac_c_conftest_c99_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  ${ac_c_conftest_c99_main}
  return ok;
}
"

# Test code for whether the C compiler supports C89 (complete).
ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  return ok;
}
"

as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
# Test code for whether the C++ compiler supports C++98 (global declarations)
ac_cxx_conftest_cxx98_globals='
// Does the compiler advertise C++98 conformance?
#if !defined __cplusplus || __cplusplus < 199711L
# error "Compiler does not advertise C++98 conformance"
#endif

// These inclusions are to reject old compilers that
// lack the unsuffixed header files.
#include <cstdlib>
#include <exception>

// <cassert> and <cstring> are *not* freestanding headers in C++98.
extern void assert (int);
namespace std {
  extern int strcmp (const char *, const char *);
}

// Namespaces, exceptions, and templates were all added after "C++ 2.0".
using std::exception;
using std::strcmp;

namespace {

void test_exception_syntax()
{
  try {
    throw "test";
  } catch (const char *s) {
    // Extra parentheses suppress a warning when building autoconf itself,
    // due to lint rules shared with more typical C programs.
    assert (!(strcmp) (s, "test"));
  }
}

template <typename T> struct test_template
{
  T const val;
  explicit test_template(T t) : val(t) {}
  template <typename U> T add(U u) { return static_cast<T>(u) + val; }
};

} // anonymous namespace
'

# Test code for whether the C++ compiler supports C++98 (body of main)
ac_cxx_conftest_cxx98_main='
  assert (argc);
  assert (! argv[0]);
{
  test_exception_syntax ();
  test_template<double> tt (2.0);
  assert (tt.add (4) == 6.0);
  assert (true && !false);
}
'

# Test code for whether the C++ compiler supports C++11 (global declarations)
ac_cxx_conftest_cxx11_globals='
// Does the compiler advertise C++ 2011 conformance?
#if !defined __cplusplus || __cplusplus < 201103L
# error "Compiler does not advertise C++11 conformance"
#endif

namespace cxx11test
{
  constexpr int get_val() { return 20; }

  struct testinit
  {
    int i;
    double d;
  };

  class delegate
  {
  public:
    delegate(int n) : n(n) {}
    delegate(): delegate(2354) {}

    virtual int getval() { return this->n; };
  protected:
    int n;
  };

  class overridden : public delegate
  {
  public:
    overridden(int n): delegate(n) {}
    virtual int getval() override final { return this->n * 2; }
  };

  class nocopy
  {
  public:
    nocopy(int i): i(i) {}
    nocopy() = default;
    nocopy(const nocopy&) = delete;
    nocopy & operator=(const nocopy&) = delete;
  private:
    int i;
  };

  // for testing lambda expressions
  template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
  {
    return f(v);
  }

  // for testing variadic templates and trailing return types
  template <typename V> auto sum(V first) -> V
  {
    return first;
  }
  template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
  {
    return first + sum(rest...);
  }
}
'

# Test code for whether the C++ compiler supports C++11 (body of main)
ac_cxx_conftest_cxx11_main='
{
  // Test auto and decltype
  auto a1 = 6538;
  auto a2 = 48573953.4;
  auto a3 = "String literal";

  int total = 0;
  for (auto i = a3; *i; ++i) { total += *i; }

  decltype(a2) a4 = 34895.034;
}
{
  // Test constexpr
  short sa[cxx11test::get_val()] = { 0 };
}
{
  // Test initializer lists
  cxx11test::testinit il = { 4323, 435234.23544 };
}
{
  // Test range-based for
  int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
                 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
  for (auto &x : array) { x += 23; }
}
{
  // Test lambda expressions
  using cxx11test::eval;
  assert (eval ([](int x) { return x*2; }, 21) == 42);
  double d = 2.0;
  assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
  assert (d == 5.0);
  assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
  assert (d == 5.0);
}
{
  // Test use of variadic templates
  using cxx11test::sum;
  auto a = sum(1);
  auto b = sum(1, 2);
  auto c = sum(1.0, 2.0, 3.0);
}
{
  // Test constructor delegation
  cxx11test::delegate d1;
  cxx11test::delegate d2();
  cxx11test::delegate d3(45);
}
{
  // Test override and final
  cxx11test::overridden o1(55464);
}
{
  // Test nullptr
  char *c = nullptr;
}
{
  // Test template brackets
  test_template<::test_template<int>> v(test_template<int>(12));
}
{
  // Unicode literals
  char const *utf8 = u8"UTF-8 string \u2500";
  char16_t const *utf16 = u"UTF-8 string \u2500";
  char32_t const *utf32 = U"UTF-32 string \u2500";
}
'

# Test code for whether the C compiler supports C++11 (complete).
ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
${ac_cxx_conftest_cxx11_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_cxx_conftest_cxx98_main}
  ${ac_cxx_conftest_cxx11_main}
  return ok;
}
"

# Test code for whether the C compiler supports C++98 (complete).
ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_cxx_conftest_cxx98_main}
  return ok;
}
"


# Auxiliary files required by this configure script.
ac_aux_files="config.guess config.sub"

# Locations in which to look for auxiliary files.
ac_aux_dir_candidates="${srcdir}/build"

# Search for a directory containing all of the required auxiliary files,
# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
# If we don't find one directory that contains all the files we need,
# we report the set of missing files from the *first* directory in
# $ac_aux_dir_candidates and give up.
ac_missing_aux_files=""
ac_first_candidate=:
printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in $ac_aux_dir_candidates
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
  as_found=:

  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
  ac_aux_dir_found=yes
  ac_install_sh=
  for ac_aux in $ac_aux_files
  do
    # As a special case, if "install-sh" is required, that requirement
    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
    # and $ac_install_sh is set appropriately for whichever one is found.
    if test x"$ac_aux" = x"install-sh"
    then
      if test -f "${as_dir}install-sh"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
        ac_install_sh="${as_dir}install-sh -c"
      elif test -f "${as_dir}install.sh"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
        ac_install_sh="${as_dir}install.sh -c"
      elif test -f "${as_dir}shtool"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
        ac_install_sh="${as_dir}shtool install -c"
      else
        ac_aux_dir_found=no
        if $ac_first_candidate; then
          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
        else
          break
        fi
      fi
    else
      if test -f "${as_dir}${ac_aux}"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
      else
        ac_aux_dir_found=no
        if $ac_first_candidate; then
          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
        else
          break
        fi
      fi
    fi
  done
  if test "$ac_aux_dir_found" = yes; then
    ac_aux_dir="$as_dir"
    break
  fi
  ac_first_candidate=false

  as_found=false
done
IFS=$as_save_IFS
if $as_found
then :

else case e in #(
  e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
esac
fi


# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
if test -f "${ac_aux_dir}config.guess"; then
  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
fi
if test -f "${ac_aux_dir}config.sub"; then
  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
fi
if test -f "$ac_aux_dir/configure"; then
  ac_configure="$SHELL ${ac_aux_dir}configure"
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in $ac_precious_vars; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val=\$ac_cv_env_${ac_var}_value
  eval ac_new_val=\$ac_env_${ac_var}_value
  case $ac_old_set,$ac_new_set in
    set,)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
	# differences in whitespace do not lead to failure.
	ac_old_val_w=`echo x $ac_old_val`
	ac_new_val_w=`echo x $ac_new_val`
	if test "$ac_old_val_w" != "$ac_new_val_w"; then
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
	  ac_cache_corrupted=:
	else
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
	  eval $ac_var=\$ac_old_val
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  '$ac_old_val'" >&5
printf "%s\n" "$as_me:   former value:  '$ac_old_val'" >&2;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: '$ac_new_val'" >&5
printf "%s\n" "$as_me:   current value: '$ac_new_val'" >&2;}
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    *) ac_arg=$ac_var=$ac_new_val ;;
    esac
    case " $ac_configure_args " in
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
  as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
	    and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
## -------------------- ##

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu








{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
printf %s "checking for grep that handles long lines and -e... " >&6; }
if test ${ac_cv_path_GREP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -z "$GREP"; then
  ac_path_GREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in grep ggrep
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in #(
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
#(
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_GREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_GREP"; then
    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_GREP=$GREP
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
printf "%s\n" "$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
printf %s "checking for egrep... " >&6; }
if test ${ac_cv_path_EGREP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     if test -z "$EGREP"; then
  ac_path_EGREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in egrep
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
  # Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in #(
*GNU*)
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
#(
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" 'EGREP' >> "conftest.nl"
    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP="$ac_path_EGREP"
      ac_path_EGREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_EGREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_EGREP"; then
    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_EGREP=$EGREP
fi

   fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
printf "%s\n" "$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"

         EGREP_TRADITIONAL=$EGREP
 ac_cv_path_EGREP_TRADITIONAL=$EGREP

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
printf %s "checking for a sed that does not truncate output... " >&6; }
if test ${ac_cv_path_SED+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)           ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
     for ac_i in 1 2 3 4 5 6 7; do
       ac_script="$ac_script$as_nl$ac_script"
     done
     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
     { ac_script=; unset ac_script;}
     if test -z "$SED"; then
  ac_path_SED_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in sed gsed
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
  # Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in #(
*GNU*)
  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
#(
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" '' >> "conftest.nl"
    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_SED_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_SED="$ac_path_SED"
      ac_path_SED_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_SED_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_SED"; then
    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
  fi
else
  ac_cv_path_SED=$SED
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
printf "%s\n" "$ac_cv_path_SED" >&6; }
 SED="$ac_cv_path_SED"
  rm -f conftest.sed







  PHP_VAR_SUBST="$PHP_VAR_SUBST EGREP"





  PHP_VAR_SUBST="$PHP_VAR_SUBST SED"


  test -f config.nice && mv config.nice config.nice.old
  rm -f config.nice.old
  cat >config.nice<<EOF
#! /bin/sh
#
# Created by configure

EOF

  clean_configure_args=$ac_configure_args
  for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
    eval val=\$$var
    if test -n "$val"; then
      echo "$var='$val' \\" >> config.nice
      if test $(expr "X$ac_configure_args" : ".*${var}.*") != 0; then
        clean_configure_args=$(echo $clean_configure_args | $SED -e "s#'$var=$val'##")
      fi
    fi
  done

  echo "'$0' \\" >> config.nice
  if test $(expr " $0" : " '.*") = 0; then
    CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$0'"
  else
    CONFIGURE_COMMAND="$CONFIGURE_COMMAND $0"
  fi
  CONFIGURE_ARGS="$clean_configure_args"
  while test "X$CONFIGURE_ARGS" != "X";
  do
   if CURRENT_ARG=$(expr "X$CONFIGURE_ARGS" : "X *\('[^']*'\)")
   then
     CONFIGURE_ARGS=$(expr "X$CONFIGURE_ARGS" : "X *'[^']*' \(.*\)")
   elif CURRENT_ARG=$(expr "X$CONFIGURE_ARGS" : "X *\([^ ]*\)")
   then
     CONFIGURE_ARGS=$(expr "X$CONFIGURE_ARGS" : "X *[^ ]* \(.*\)")
     CURRENT_ARG="'$CURRENT_ARG'"
   else
    break
   fi
   printf "%s\n" "$CURRENT_ARG \\" >>config.nice
   CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CURRENT_ARG"
  done
  echo '"$@"' >> config.nice
  chmod +x config.nice
  CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"







  # Make sure we can run config.sub.
$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
printf %s "checking build system type... " >&6; }
if test ${ac_cv_build+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
printf "%s\n" "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
printf %s "checking host system type... " >&6; }
if test ${ac_cv_host+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
else
  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
printf "%s\n" "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
printf %s "checking target system type... " >&6; }
if test ${ac_cv_target+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "x$target_alias" = x; then
  ac_cv_target=$ac_cv_host
else
  ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` ||
    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
printf "%s\n" "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_target
shift
target_cpu=$1
target_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
target_os=$*
IFS=$ac_save_IFS
case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac


# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

        if test -z "$host_alias" && test -n "$host"; then
    host_alias=$host
  fi
  if ${host_alias:+false} :
then :
  as_fn_error $? "host_alias is not set! Make sure to run config.guess" "$LINENO" 5
fi


ac_config_headers="$ac_config_headers main/php_config.h"





ac_IFS=$IFS; IFS="."
set $(echo 8.5.7 | "${SED}" 's/\([0-9\.]*\)\(.*\)/\1\.\2/')
IFS=$ac_IFS
PHP_MAJOR_VERSION=$1
PHP_MINOR_VERSION=$2
PHP_RELEASE_VERSION=$3
if ${PHP_EXTRA_VERSION:+false} :
then :
  PHP_EXTRA_VERSION=$4
fi
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=$(expr $PHP_MAJOR_VERSION \* 10000 + $PHP_MINOR_VERSION \* 100 + $PHP_RELEASE_VERSION)


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_MAJOR_VERSION"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_MINOR_VERSION"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_RELEASE_VERSION"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_EXTRA_VERSION"



echo "/* automatically generated by configure */" > php_version.h.new
echo "/* edit configure.ac to change version number */" >> php_version.h.new
echo "#define PHP_MAJOR_VERSION $PHP_MAJOR_VERSION" >> php_version.h.new
echo "#define PHP_MINOR_VERSION $PHP_MINOR_VERSION" >> php_version.h.new
echo "#define PHP_RELEASE_VERSION $PHP_RELEASE_VERSION" >> php_version.h.new
echo "#define PHP_EXTRA_VERSION \"$PHP_EXTRA_VERSION\"" >> php_version.h.new
echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new
echo "#define PHP_VERSION_ID $PHP_VERSION_ID" >> php_version.h.new
cmp php_version.h.new $srcdir/main/php_version.h >/dev/null 2>&1
if test $? -ne 0 ; then
  rm -f $srcdir/main/php_version.h && mv php_version.h.new $srcdir/main/php_version.h && \
  echo 'Updated main/php_version.h'
else
  rm -f php_version.h.new
fi


php_shtool=$srcdir/build/shtool
T_MD=$($php_shtool echo -n -e %B)
T_ME=$($php_shtool echo -n -e %b)

> Makefile.objects
> Makefile.fragments

if ${CFLAGS:+false} :
then :
  auto_cflags=1
fi


for ac_prog in gawk nawk awk mawk
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AWK+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="/usr/xpg4/bin/:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_AWK="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
printf "%s\n" "$AWK" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$AWK" && break
done
test -n "$AWK" || AWK="bork"

case $AWK in #(
  *mawk) :
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mawk is known to have problems on some systems. You should install GNU awk" >&5
printf "%s\n" "$as_me: WARNING: mawk is known to have problems on some systems. You should install GNU awk" >&2;} ;; #(
  *gawk) :
     ;; #(
  bork) :
    as_fn_error $? "Could not find awk; Install GNU awk" "$LINENO" 5 ;; #(
  *) :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $AWK is broken" >&5
printf %s "checking if $AWK is broken... " >&6; }
    if ! $AWK 'function foo() {}' >/dev/null 2>&1
then :

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
      as_fn_error $? "You should install GNU awk" "$LINENO" 5

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
   ;;
esac

  PHP_VAR_SUBST="$PHP_VAR_SUBST AWK"



abs_srcdir=$(cd $srcdir && pwd)
abs_builddir=$(pwd)




$php_shtool mkdir -p libs
rm -f libs/*









if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
	if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PKG_CONFIG+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
printf "%s\n" "$PKG_CONFIG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
  ac_pt_PKG_CONFIG=$PKG_CONFIG
  # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $ac_pt_PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac ;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_pt_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_pt_PKG_CONFIG
  fi
else
  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi

fi
if test -n "$PKG_CONFIG"; then
	_pkg_min_version=0.9.0
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	else
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
		PKG_CONFIG=""
	fi
fi









ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in cc gcc
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cc gcc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
printf "%s\n" "$ac_ct_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CC" && break
done

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi


test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See 'config.log' for more details" "$LINENO" 5; }

# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion -version; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
printf %s "checking whether the C compiler works... " >&6; }
ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"

ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  esac
done
rm -f $ac_rmfiles

if { { ac_try="$ac_link_default"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
then :
  # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files ''
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an '-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else case e in #(
  e) ac_file='' ;;
esac
fi
if test -z "$ac_file"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See 'config.log' for more details" "$LINENO" 5; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; } ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
printf %s "checking for C compiler default output file name... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext

rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
then :
  # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
# catch 'conftest.exe'.  For instance with Cygwin, 'ls conftest' will
# work properly (i.e., refer to 'conftest.exe'), while it won't with
# 'rm'.
for ac_file in conftest.exe conftest conftest.*; do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi
rm -f conftest conftest$ac_cv_exeext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
printf "%s\n" "$ac_cv_exeext" >&6; }

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main (void)
{
FILE *f = fopen ("conftest.out", "w");
 if (!f)
  return 1;
 return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
  { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
  if { ac_try='./conftest$ac_cv_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use '--host'.
See 'config.log' for more details" "$LINENO" 5; }
    fi
  fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
printf "%s\n" "$cross_compiling" >&6; }

rm -f conftest.$ac_ext conftest$ac_cv_exeext \
  conftest.o conftest.obj conftest.out
ac_clean_files=$ac_clean_files_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
printf %s "checking for suffix of object files... " >&6; }
if test ${ac_cv_objext+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
then :
  for ac_file in conftest.o conftest.obj conftest.*; do
  test -f "$ac_file" || continue;
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else case e in #(
  e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
printf %s "checking whether the compiler supports GNU C... " >&6; }
if test ${ac_cv_c_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else case e in #(
  e) ac_compiler_gnu=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_c_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
printf %s "checking whether $CC accepts -g... " >&6; }
if test ${ac_cv_prog_cc_g+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_prog_cc_g=no
   CFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_g=yes
else case e in #(
  e) CFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

else case e in #(
  e) ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
if test $ac_test_CFLAGS; then
  CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
ac_prog_cc_stdc=no
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
printf %s "checking for $CC option to enable C11 features... " >&6; }
if test ${ac_cv_prog_cc_c11+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c11_program
_ACEOF
for ac_arg in '' -std=gnu11
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c11" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC ;;
esac
fi

if test "x$ac_cv_prog_cc_c11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cc_c11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
     CC="$CC $ac_cv_prog_cc_c11" ;;
esac
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
  ac_prog_cc_stdc=c11 ;;
esac
fi
fi
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
printf %s "checking for $CC option to enable C99 features... " >&6; }
if test ${ac_cv_prog_cc_c99+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cc_c99=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c99_program
_ACEOF
for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c99=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC ;;
esac
fi

if test "x$ac_cv_prog_cc_c99" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cc_c99" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
     CC="$CC $ac_cv_prog_cc_c99" ;;
esac
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
  ac_prog_cc_stdc=c99 ;;
esac
fi
fi
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
printf %s "checking for $CC option to enable C89 features... " >&6; }
if test ${ac_cv_prog_cc_c89+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c89_program
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC ;;
esac
fi

if test "x$ac_cv_prog_cc_c89" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cc_c89" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
     CC="$CC $ac_cv_prog_cc_c89" ;;
esac
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
  ac_prog_cc_stdc=c89 ;;
esac
fi
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test ${ac_cv_prog_CPP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)     # Double quotes because $CC needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
  break
fi

    done
    ac_cv_prog_CPP=$CPP
   ;;
esac
fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
printf %s "checking for egrep -e... " >&6; }
if test ${ac_cv_path_EGREP_TRADITIONAL+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -z "$EGREP_TRADITIONAL"; then
  ac_path_EGREP_TRADITIONAL_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in grep ggrep
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
  # Check for GNU $ac_path_EGREP_TRADITIONAL
case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
*GNU*)
  ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
#(
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
    "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
      ac_path_EGREP_TRADITIONAL_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_EGREP_TRADITIONAL_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
    :
  fi
else
  ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
fi

    if test "$ac_cv_path_EGREP_TRADITIONAL"
then :
  ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
else case e in #(
  e) if test -z "$EGREP_TRADITIONAL"; then
  ac_path_EGREP_TRADITIONAL_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in egrep
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
  # Check for GNU $ac_path_EGREP_TRADITIONAL
case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
*GNU*)
  ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
#(
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
    "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
      ac_path_EGREP_TRADITIONAL_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_EGREP_TRADITIONAL_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
fi
 ;;
esac
fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL


  ICC="no"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for icc" >&5
printf %s "checking for icc... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
__INTEL_COMPILER
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "^__INTEL_COMPILER" >/dev/null 2>&1
then :
  ICC="no"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
else case e in #(
  e) ICC="yes"
    GCC="no"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
   ;;
esac
fi
rm -rf conftest*



  SUNCC="no"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suncc" >&5
printf %s "checking for suncc... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
__SUNPRO_C
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "^__SUNPRO_C" >/dev/null 2>&1
then :
  SUNCC="no"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
else case e in #(
  e) SUNCC="yes"
    GCC="no"
    test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
    GCC=""
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
   ;;
esac
fi
rm -rf conftest*




ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test ${ac_cv_prog_CPP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)     # Double quotes because $CC needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
  break
fi

    done
    ac_cv_prog_CPP=$CPP
   ;;
esac
fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

ac_header= ac_cache=
for ac_item in $ac_header_c_list
do
  if test $ac_cache; then
    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
      printf "%s\n" "#define $ac_item 1" >> confdefs.h
    fi
    ac_header= ac_cache=
  elif test $ac_header; then
    ac_cache=$ac_item
  else
    ac_header=$ac_item
  fi
done








if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
then :

printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h

fi






  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
if test ${ac_cv_safe_to_define___extensions__+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#         define __EXTENSIONS__ 1
          $ac_includes_default
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_safe_to_define___extensions__=yes
else case e in #(
  e) ac_cv_safe_to_define___extensions__=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
if test ${ac_cv_should_define__xopen_source+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_should_define__xopen_source=no
    if test $ac_cv_header_wchar_h = yes
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

          #include <wchar.h>
          mbstate_t x;
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

            #define _XOPEN_SOURCE 500
            #include <wchar.h>
            mbstate_t x;
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_should_define__xopen_source=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }

  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h

  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h

  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h

  if test $ac_cv_header_minix_config_h = yes
then :
  MINIX=yes
    printf "%s\n" "#define _MINIX 1" >>confdefs.h

    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h

    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h

else case e in #(
  e) MINIX= ;;
esac
fi
  if test $ac_cv_safe_to_define___extensions__ = yes
then :
  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h

fi
  if test $ac_cv_should_define__xopen_source = yes
then :
  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
printf "%s\n" "no, using $LN_S" >&6; }
fi


if test "x$cross_compiling" = xyes
then :
  for ac_prog in gcc clang c99 c89 cc cl
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_BUILD_CC+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$BUILD_CC"; then
  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_BUILD_CC="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
BUILD_CC=$ac_cv_prog_BUILD_CC
if test -n "$BUILD_CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
printf "%s\n" "$BUILD_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$BUILD_CC" && break
done
test -n "$BUILD_CC" || BUILD_CC="none"

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for native build C compiler" >&5
printf %s "checking for native build C compiler... " >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
printf "%s\n" "$BUILD_CC" >&6; }
else case e in #(
  e) BUILD_CC=$CC ;;
esac
fi

if test "$ac_cv_prog_cc_c99" = no; then
  as_fn_error $? "C compiler would not accept C99 code" "$LINENO" 5
fi


php_with_libdir=lib

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for system library directory" >&5
printf %s "checking for system library directory... " >&6; }

# Check whether --with-libdir was given.
if test ${with_libdir+y}
then :
  withval=$with_libdir; PHP_LIBDIR=$withval
else case e in #(
  e)
  PHP_LIBDIR=lib

 ;;
esac
fi


ext_output=$PHP_LIBDIR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_enable_rpath=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable runpaths" >&5
printf %s "checking whether to enable runpaths... " >&6; }
# Check whether --enable-rpath was given.
if test ${enable_rpath+y}
then :
  enableval=$enable_rpath; PHP_RPATH=$enableval
else case e in #(
  e)
  PHP_RPATH=yes

 ;;
esac
fi


ext_output=$PHP_RPATH
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wl,-rpath," >&5
printf %s "checking if compiler supports -Wl,-rpath,... " >&6; }
if test ${php_cv_cc_rpath+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  SAVE_LIBS=$LIBS
  LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_cc_rpath=yes
else case e in #(
  e) php_cv_cc_rpath=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  LIBS=$SAVE_LIBS
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_cc_rpath" >&5
printf "%s\n" "$php_cv_cc_rpath" >&6; }
if test "x$php_cv_cc_rpath" = xyes
then :
  ld_runpath_switch=-Wl,-rpath,
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -R" >&5
printf %s "checking if compiler supports -R... " >&6; }
if test ${php_cv_cc_dashr+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    SAVE_LIBS=$LIBS
    LIBS="-R /usr/$PHP_LIBDIR $LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_cc_dashr=yes
else case e in #(
  e) php_cv_cc_dashr=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
    LIBS=$SAVE_LIBS
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_cc_dashr" >&5
printf "%s\n" "$php_cv_cc_dashr" >&6; }
  if test "x$php_cv_cc_dashr" = xyes
then :
  ld_runpath_switch=-R
else case e in #(
  e) ld_runpath_switch=-L ;;
esac
fi
 ;;
esac
fi
if test "x$PHP_RPATH" = xno
then :
  ld_runpath_switch=
fi



  # Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_YACC+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_YACC="bison"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
printf "%s\n" "$YACC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi



  php_bison_required_version="3.0.0"
  php_bison_excluded_versions='none'

  if test -n "$YACC"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bison version" >&5
printf %s "checking for bison version... " >&6; }

    php_bison_version=$($YACC --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | tr -d a-z)
    if test -z "$php_bison_version"; then
      php_bison_version=0.0.0
    fi
    ac_IFS=$IFS; IFS="."
    set $php_bison_version
    IFS=$ac_IFS
    php_bison_num=$(expr ${1:-0} \* 10000 + ${2:-0} \* 100 + ${3:-0})
    php_bison_branch="$1.$2"
    php_bison_check=ok

    if test -z "$php_bison_required_version" && test -z "$php_bison_num"; then
      php_bison_check=invalid
    elif test -n "$php_bison_required_version"; then
      ac_IFS=$IFS; IFS="."
      set $php_bison_required_version
      IFS=$ac_IFS
      php_bison_required_num=$(expr ${1:-0} \* 10000 + ${2:-0} \* 100 + ${3:-0})
      php_bison_required_version="$php_bison_required_version or later"

      if test -z "$php_bison_num" || test "$php_bison_num" -lt "$php_bison_required_num"; then
        php_bison_check=invalid
      fi
    fi

    for php_bison_check_version in $php_bison_excluded_versions; do
      if test "$php_bison_version" = "$php_bison_check_version" || test "$php_bison_branch" = "$php_bison_check_version"; then
        php_bison_check=invalid
        break
      fi
    done

    if test "$php_bison_check" != "invalid"; then

  YFLAGS=-Wall


  PHP_VAR_SUBST="$PHP_VAR_SUBST YFLAGS"


      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_bison_version (ok)" >&5
printf "%s\n" "$php_bison_version (ok)" >&6; }
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_bison_version" >&5
printf "%s\n" "$php_bison_version" >&6; }
    fi
  fi

  case $php_bison_check in
    ""|invalid)
      if test ! -f "$abs_srcdir/Zend/zend_language_parser.h" || test ! -f "$abs_srcdir/Zend/zend_language_parser.c"; then
        as_fn_error $? "bison $php_bison_required_version or newer is required to generate PHP parsers
(excluded versions: $php_bison_excluded_versions)." "$LINENO" 5
      fi

      YACC="exit 0;"
      ;;
  esac


  PHP_VAR_SUBST="$PHP_VAR_SUBST YACC"



  # Extract the first word of "re2c", so it can be a program name with args.
set dummy re2c; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_RE2C+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$RE2C"; then
  ac_cv_prog_RE2C="$RE2C" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_RE2C="re2c"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
RE2C=$ac_cv_prog_RE2C
if test -n "$RE2C"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RE2C" >&5
printf "%s\n" "$RE2C" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi



  php_re2c_check=
  if ${RE2C:+false} :
then :

else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for re2c version" >&5
printf %s "checking for re2c version... " >&6; }

    php_re2c_version=$($RE2C --version | cut -d ' ' -f 2 2>/dev/null)

    php_re2c_check=ok
    as_arg_v1=$php_re2c_version
as_arg_v2=1.0.3
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
case $? in #(
  1) :
    php_re2c_check=invalid ;; #(
  0) :
     ;; #(
  2) :
     ;; #(
  *) :
     ;;
esac

    if test "x$php_re2c_check" = xinvalid
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_re2c_version (too old)" >&5
printf "%s\n" "$php_re2c_version (too old)" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_re2c_version (ok)" >&5
printf "%s\n" "$php_re2c_version (ok)" >&6; } ;;
esac
fi
   ;;
esac
fi

  case $php_re2c_check in #(
  ""|invalid) :

      if test ! -f "$abs_srcdir/Zend/zend_language_scanner.c"
then :

        as_fn_error $? "re2c 1.0.3 or newer is required to generate PHP lexers." "$LINENO" 5

fi

      RE2C="exit 0;"
     ;; #(
  *) :
     ;;
esac


  PHP_VAR_SUBST="$PHP_VAR_SUBST RE2C"

  RE2C_FLAGS="--no-generation-date"

  PHP_VAR_SUBST="$PHP_VAR_SUBST RE2C_FLAGS"


php_required_version=7.4
# Extract the first word of "php", so it can be a program name with args.
set dummy php; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_PHP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$PHP"; then
  ac_cv_prog_PHP="$PHP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_PHP="php"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
PHP=$ac_cv_prog_PHP
if test -n "$PHP"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PHP" >&5
printf "%s\n" "$PHP" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


if ${PHP:+false} :
then :

else case e in #(
  e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for php version" >&5
printf %s "checking for php version... " >&6; }
php_version=$($PHP -v | head -n1 | cut -d ' ' -f 2)
as_arg_v1=$php_version
as_arg_v2=$php_required_version
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
case $? in #(
  1) :
    unset PHP ;; #(
  0) :
     ;; #(
  2) :
     ;; #(
  *) :
     ;;
esac
if ${PHP:+false} :
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_version (too old, install $php_required_version or later)" >&5
printf "%s\n" "$php_version (too old, install $php_required_version or later)" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_version (ok)" >&5
printf "%s\n" "$php_version (ok)" >&6; } ;;
esac
fi
 ;;
esac
fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP"




php_enable_re2c_cgoto=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable computed goto extension with re2c" >&5
printf %s "checking whether to enable computed goto extension with re2c... " >&6; }
# Check whether --enable-re2c-cgoto was given.
if test ${enable_re2c_cgoto+y}
then :
  enableval=$enable_re2c_cgoto; PHP_RE2C_CGOTO=$enableval
else case e in #(
  e)
  PHP_RE2C_CGOTO=no

 ;;
esac
fi


ext_output=$PHP_RE2C_CGOTO
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_RE2C_CGOTO" = xno
then :

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether re2c -g works" >&5
printf %s "checking whether re2c -g works... " >&6; }
if test ${php_cv_have_re2c_cgoto+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int main(void)
{
label1:
  ;
label2:
  ;
  static void *adr[] = { &&label1, &&label2 };
  goto *adr[0];
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_re2c_cgoto=yes
else case e in #(
  e) php_cv_have_re2c_cgoto=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_re2c_cgoto" >&5
printf "%s\n" "$php_cv_have_re2c_cgoto" >&6; }
if test "x$php_cv_have_re2c_cgoto" = xyes
then :
  as_fn_append RE2C_FLAGS " -g"
fi
 ;;
esac
fi


case $host_cpu in
  alpha*)
    if test "$GCC" = "yes"; then
      CFLAGS="$CFLAGS -mieee"
    else
      CFLAGS="$CFLAGS -ieee"
    fi
    ;;
  sparc*)
    if test "$SUNCC" = "yes"; then
      CFLAGS="$CFLAGS -xmemalign=8s"
    fi
    ;;
esac

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -ffp-contract=off" >&5
printf %s "checking whether the C compiler accepts -ffp-contract=off... " >&6; }
if test ${ax_cv_check_cflags___ffp_contract_off+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -ffp-contract=off $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___ffp_contract_off=yes
else case e in #(
  e) ax_cv_check_cflags___ffp_contract_off=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___ffp_contract_off" >&5
printf "%s\n" "$ax_cv_check_cflags___ffp_contract_off" >&6; }
if test "x$ax_cv_check_cflags___ffp_contract_off" = xyes
then :
  CFLAGS="$CFLAGS -ffp-contract=off"
else case e in #(
  e) : ;;
esac
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fvisibility=hidden" >&5
printf %s "checking whether the C compiler accepts -fvisibility=hidden... " >&6; }
if test ${ax_cv_check_cflags___fvisibility_hidden+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -fvisibility=hidden $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___fvisibility_hidden=yes
else case e in #(
  e) ax_cv_check_cflags___fvisibility_hidden=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fvisibility_hidden" >&5
printf "%s\n" "$ax_cv_check_cflags___fvisibility_hidden" >&6; }
if test "x$ax_cv_check_cflags___fvisibility_hidden" = xyes
then :
  CFLAGS="$CFLAGS -fvisibility=hidden"
else case e in #(
  e) : ;;
esac
fi


case $host_alias in
  *haiku*)
    LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
    ;;
  *solaris*)
    CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
    ;;
  *hpux*)
    if test "$GCC" = "yes"; then
      CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
    fi
    ;;
esac

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to force non-PIC code in shared modules" >&5
printf %s "checking whether to force non-PIC code in shared modules... " >&6; }
case $host_alias in
  i?86-*-linux*|i?86-*-freebsd*)
    if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
      with_pic=no
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
    fi
    ;;
  *)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
    ;;
esac

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking C standard library implementation" >&5
printf %s "checking C standard library implementation... " >&6; }
if test ${php_cv_c_standard_library+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) php_cv_c_standard_library=unknown
if test "x$php_cv_c_standard_library" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <features.h>
int
main (void)
{
#ifndef __UCLIBC__
  (void) __UCLIBC__;
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_c_standard_library=uclibc
else case e in #(
  e) php_cv_c_standard_library=unknown ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
if test "x$php_cv_c_standard_library" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <features.h>
int
main (void)
{
#ifndef __GLIBC__
  (void) __GLIBC__;
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_c_standard_library=glibc
else case e in #(
  e) php_cv_c_standard_library=unknown ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
if test "x$php_cv_c_standard_library" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdarg.h>
int
main (void)
{
#ifndef __DEFINED_va_list
  (void) __DEFINED_va_list;
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_c_standard_library=musl
else case e in #(
  e) if command -v ldd >/dev/null && ldd --version 2>&1 | grep ^musl >/dev/null 2>&1
then :
  php_cv_c_standard_library=musl
else case e in #(
  e) php_cv_c_standard_library=unknown ;;
esac
fi ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_c_standard_library" >&5
printf "%s\n" "$php_cv_c_standard_library" >&6; }

if test "x$php_cv_c_standard_library" = xmusl
then :

printf "%s\n" "#define __MUSL__ 1" >>confdefs.h

fi

as_fn_append CPPFLAGS " -D_GNU_SOURCE"


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthreads_cflags" >&5
printf %s "checking for pthreads_cflags... " >&6; }
if test ${ac_cv_pthreads_cflags+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
ac_cv_pthreads_cflags=
if test "$pthreads_working" != "yes"; then
  for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
    ac_save=$CFLAGS
    CFLAGS="$CFLAGS $flag"

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main(void) {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :

  pthreads_checked=yes

else case e in #(
  e)
  pthreads_checked=no

 ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
    CFLAGS=$ac_save
    if test "$pthreads_checked" = "yes"; then
      ac_cv_pthreads_cflags=$flag
      break
    fi
  done
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthreads_cflags" >&5
printf "%s\n" "$ac_cv_pthreads_cflags" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthreads_lib" >&5
printf %s "checking for pthreads_lib... " >&6; }
if test ${ac_cv_pthreads_lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
ac_cv_pthreads_lib=
if test "$pthreads_working" != "yes"; then
 for lib in pthread pthreads c_r; do
    ac_save=$LIBS
    LIBS="$LIBS -l$lib"

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main(void) {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :

  pthreads_checked=yes

else case e in #(
  e)
  pthreads_checked=no

 ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
    LIBS=$ac_save
    if test "$pthreads_checked" = "yes"; then
      ac_cv_pthreads_lib=$lib
      break
    fi
  done
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthreads_lib" >&5
printf "%s\n" "$ac_cv_pthreads_lib" >&6; }

if test "x$ac_cv_pthreads_cflags" != "x" || test "x$ac_cv_pthreads_lib" != "x"; then
  pthreads_working="yes"
fi

# Check whether --enable- was given.
if test ${enable_+y}
then :
  enableval=$enable_;
fi


case $host_alias in #(
  *hpux*) :

    SHLIB_SUFFIX_NAME=sl
    SHLIB_DL_SUFFIX_NAME=sl
   ;; #(
  *darwin*) :

    SHLIB_SUFFIX_NAME=dylib
    SHLIB_DL_SUFFIX_NAME=so
   ;; #(
  *) :

    SHLIB_SUFFIX_NAME=so
    SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
   ;;
esac



  PHP_VAR_SUBST="$PHP_VAR_SUBST SHLIB_SUFFIX_NAME"





  PHP_VAR_SUBST="$PHP_VAR_SUBST SHLIB_DL_SUFFIX_NAME"




  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

PHP_SAPI=none


SAPI_LIBNAME=libphp
SAPI_LIBNAME_SHARED=$SAPI_LIBNAME.$SHLIB_DL_SUFFIX_NAME
SAPI_LIBNAME_STATIC=$SAPI_LIBNAME.a
SAPI_SHARED=libs/$SAPI_LIBNAME_SHARED
SAPI_STATIC=libs/$SAPI_LIBNAME_STATIC
SAPI_LIBTOOL=libphp.la


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${T_MD}Configuring SAPI modules${T_ME}" >&5
printf "%s\n" "${T_MD}Configuring SAPI modules${T_ME}" >&6; }










php_with_apxs2=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Apache 2 handler module support via DSO through APXS" >&5
printf %s "checking whether to build Apache 2 handler module support via DSO through APXS... " >&6; }

# Check whether --with-apxs2 was given.
if test ${with_apxs2+y}
then :
  withval=$with_apxs2; PHP_APXS2=$withval
else case e in #(
  e)
  PHP_APXS2=no

 ;;
esac
fi


ext_output=$PHP_APXS2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_APXS2" != "no"; then
  if test "x$PHP_APXS2" = xyes
then :

    APXS=apxs
    $APXS -q CFLAGS >/dev/null 2>&1
    if test "$?" != "0" && test -x /usr/sbin/apxs; then
      APXS=/usr/sbin/apxs
    fi

else case e in #(
  e)
  if test -z "$PHP_APXS2" || echo "$PHP_APXS2" | grep '^/' >/dev/null ; then
    APXS=$PHP_APXS2
  else

    ep_dir=$(echo $PHP_APXS2|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    APXS="$ep_realdir"/$(basename "$PHP_APXS2")
  fi
 ;;
esac
fi

  $APXS -q CFLAGS >/dev/null 2>&1
  if test "$?" != "0"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, I cannot run apxs.  Possible reasons follow:" >&5
printf "%s\n" "Sorry, I cannot run apxs.  Possible reasons follow:" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 1. Perl is not installed" >&5
printf "%s\n" "1. Perl is not installed" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs" >&5
printf "%s\n" "2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 3. Apache was not built using --enable-so (the apxs usage page is displayed)" >&5
printf "%s\n" "3. Apache was not built using --enable-so (the apxs usage page is displayed)" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: The output of $APXS follows:" >&5
printf "%s\n" "The output of $APXS follows:" >&6; }
    $APXS -q CFLAGS
    as_fn_error $? "Aborting" "$LINENO" 5
  fi

  APXS_INCLUDEDIR=$($APXS -q INCLUDEDIR)
  APXS_HTTPD=$($APXS -q SBINDIR)/$($APXS -q TARGET)
  if test ! -x "$APXS_HTTPD"
then :
  as_fn_error $? "$APXS_HTTPD executable not found. Please, install Apache HTTP Server
command-line utility." "$LINENO" 5
fi

  APXS_CFLAGS=$($APXS -q CFLAGS)
  APU_BINDIR=$($APXS -q APU_BINDIR)
  APR_BINDIR=$($APXS -q APR_BINDIR)

    APR_CONFIG=$($APXS -q APR_CONFIG 2>/dev/null || echo $APR_BINDIR/apr-config)
  APU_CONFIG=$($APXS -q APU_CONFIG 2>/dev/null || echo $APU_BINDIR/apu-config)

  APR_CFLAGS="$($APR_CONFIG --cppflags --includes)"
  APU_CFLAGS="$($APU_CONFIG --includes)"

  for flag in $APXS_CFLAGS; do
    case $flag in #(
  -D*) :
    APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag" ;; #(
  *) :
     ;;
esac
  done

      APACHE_VERSION=$($APXS -q HTTPD_VERSION 2>/dev/null)
  if ${APACHE_VERSION:+false} :
then :

    ac_output=$($APXS_HTTPD -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//')
    ac_IFS=$IFS
    IFS="- /.
"
    set $ac_output
    IFS=$ac_IFS
    APACHE_VERSION="$4.$5.$6"

fi
  as_arg_v1=$APACHE_VERSION
as_arg_v2=2.4.0
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
case $? in #(
  1) :
    as_fn_error $? "Please note that Apache version >= 2.4 is required" "$LINENO" 5 ;; #(
  0) :
     ;; #(
  2) :
     ;; #(
  *) :
     ;;
esac

  APXS_LIBEXECDIR='$(INSTALL_ROOT)'$($APXS -q LIBEXECDIR)
  if test -z $($APXS -q SYSCONFDIR); then
    INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
                 $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
                       -i -n php"
  else
    APXS_SYSCONFDIR='$(INSTALL_ROOT)'$($APXS -q SYSCONFDIR)
    INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
                \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
                 $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
                       -S SYSCONFDIR='$APXS_SYSCONFDIR' \
                       -i -a -n php"
  fi

  LIBPHP_CFLAGS="-shared"

  PHP_VAR_SUBST="$PHP_VAR_SUBST LIBPHP_CFLAGS"


  php_sapi_apache2handler_type=shared
  case $host_alias in #(
  *aix*) :

      EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
      INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
     ;; #(
  *darwin*) :

                              if test -x "$APR_CONFIG"; then
        MH_BUNDLE_FLAGS="$($APR_CONFIG --ldflags --link-ld --libs)"
      fi
      if test -x "$APU_CONFIG"; then
        MH_BUNDLE_FLAGS="$($APU_CONFIG --ldflags --link-ld --libs) $MH_BUNDLE_FLAGS"
      fi
      MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"

  PHP_VAR_SUBST="$PHP_VAR_SUBST MH_BUNDLE_FLAGS"

      php_sapi_apache2handler_type=bundle
      INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
     ;; #(
  *) :
    INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL" ;;
esac


  if test "$php_sapi_apache2handler_type" = "program"; then
    PHP_BINARIES="$PHP_BINARIES apache2handler"
  elif test "$PHP_SAPI" != "none"; then
    as_fn_error $? "
+--------------------------------------------------------------------+
|                        *** ATTENTION ***                           |
|                                                                    |
| You've configured multiple SAPIs to be built. You can build only   |
| one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
+--------------------------------------------------------------------+
" "$LINENO" 5
  else
    PHP_SAPI=apache2handler
  fi

  as_fn_append BUILD_DIR " sapi/apache2handler"


  PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS apache2handler"


    case "$php_sapi_apache2handler_type" in
    static)

  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

  OVERALL_TARGET=libphp.la
  php_sapi_module=static
;;
    shared)

  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

  OVERALL_TARGET=libphp.la
  php_sapi_module=shared

  php_c_pre=$shared_c_pre
  php_c_meta=$shared_c_meta
  php_c_post=$shared_c_post
  php_cxx_pre=$shared_cxx_pre
  php_cxx_meta=$shared_cxx_meta
  php_cxx_post=$shared_cxx_post
  php_lo=$shared_lo
;;
    shared-dylib)


  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

  OVERALL_TARGET=libphp.la
  php_sapi_module=shared

  php_c_pre=$shared_c_pre
  php_c_meta=$shared_c_meta
  php_c_post=$shared_c_post
  php_cxx_pre=$shared_cxx_pre
  php_cxx_meta=$shared_cxx_meta
  php_cxx_post=$shared_cxx_post
  php_lo=$shared_lo

  OVERALL_TARGET=libphp.dylib
;;
    bundle)

  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

  OVERALL_TARGET=libs/libphp.bundle
  php_sapi_module=static
;;
    esac
    install_sapi="install-sapi"


  case sapi/apache2handler in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/apache2handler"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/apache2handler/"; ac_bdir="sapi/apache2handler/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mod_php.c sapi_apache2.c apache_config.c php_functions.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done





  if $APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes' >/dev/null 2>&1
then :

    APACHE_THREADED_MPM=yes
    enable_zts=yes

else case e in #(
  e) APACHE_THREADED_MPM=no ;;
esac
fi

ac_config_commands="$ac_config_commands apache2handler"

fi





php_enable_cli=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CLI build" >&5
printf %s "checking for CLI build... " >&6; }
# Check whether --enable-cli was given.
if test ${enable_cli+y}
then :
  enableval=$enable_cli; PHP_CLI=$enableval
else case e in #(
  e)
  PHP_CLI=yes

 ;;
esac
fi


ext_output=$PHP_CLI
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_CLI" != "no"; then
  ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
if test "x$ac_cv_func_setproctitle" = xyes
then :
  printf "%s\n" "#define HAVE_SETPROCTITLE 1" >>confdefs.h

fi


  ac_fn_c_check_header_compile "$LINENO" "sys/pstat.h" "ac_cv_header_sys_pstat_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_pstat_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_PSTAT_H 1" >>confdefs.h

fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
printf %s "checking for PS_STRINGS... " >&6; }
if test ${php_cv_var_PS_STRINGS+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

      #include <machine/vmparam.h>
      #include <sys/exec.h>

int
main (void)
{

      PS_STRINGS->ps_nargvstr = 1;
      PS_STRINGS->ps_argvstr = "foo";

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_var_PS_STRINGS=yes
else case e in #(
  e) php_cv_var_PS_STRINGS=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_var_PS_STRINGS" >&5
printf "%s\n" "$php_cv_var_PS_STRINGS" >&6; }
  if test "x$php_cv_var_PS_STRINGS" = xyes
then :

printf "%s\n" "#define HAVE_PS_STRINGS /**/" >>confdefs.h

fi

    src=$abs_srcdir/sapi/cli/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments


    SAPI_CLI_PATH=sapi/cli/php


  if test "program" = "program"; then
    PHP_BINARIES="$PHP_BINARIES cli"
  elif test "$PHP_SAPI" != "none"; then
    as_fn_error $? "
+--------------------------------------------------------------------+
|                        *** ATTENTION ***                           |
|                                                                    |
| You've configured multiple SAPIs to be built. You can build only   |
| one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
+--------------------------------------------------------------------+
" "$LINENO" 5
  else
    PHP_SAPI=cli
  fi

  as_fn_append BUILD_DIR " sapi/cli"


  PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS cli"



  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

    install_binaries="install-binaries"
    install_binary_targets="$install_binary_targets install-cli"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_CLI_OBJS"


  case sapi/cli in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/cli"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/cli/"; ac_bdir="sapi/cli/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_cli.c php_http_parser.c php_cli_server.c ps_title.c php_cli_process_title.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done




  case $host_alias in #(
  *aix*) :

      if test "x$php_sapi_module" = xshared
then :

        BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"

else case e in #(
  e)
        BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
       ;;
esac
fi
     ;; #(
  *darwin*) :

      BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
     ;; #(
  *) :

      BUILD_CLI="\$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
     ;;
esac

    PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_EXECUTABLE"


  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_CLI_PATH"


  PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_CLI"


  ac_config_files="$ac_config_files sapi/cli/php.1"



    header_path=sapi/cli
    for header_file in cli.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done


fi





php_enable_embed=no


# Check whether --enable-embed was given.
if test ${enable_embed+y}
then :
  enableval=$enable_embed; PHP_EMBED=$enableval
else case e in #(
  e)
  PHP_EMBED=no

 ;;
esac
fi


ext_output=$PHP_EMBED





{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for embedded SAPI library support" >&5
printf %s "checking for embedded SAPI library support... " >&6; }

if test "$PHP_EMBED" != "no"; then
  case $PHP_EMBED in #(
  yes|shared) :

      LIBPHP_CFLAGS="-shared"
      case "$host_alias" in #(
  *darwin*) :

        SAPI_SHARED="libs/libphp.dylib"
        PHP_EMBED_TYPE=shared-dylib
       ;; #(
  *) :
    PHP_EMBED_TYPE=shared ;;
esac
      INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(orig_libdir)"
     ;; #(
  static) :

      LIBPHP_CFLAGS="-static"
      PHP_EMBED_TYPE=static
      INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0644 $SAPI_STATIC \$(INSTALL_ROOT)\$(orig_libdir)"
     ;; #(
  *) :
    PHP_EMBED_TYPE= ;;
esac

  if ${PHP_EMBED_TYPE:+false} :
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PHP_EMBED_TYPE" >&5
printf "%s\n" "$PHP_EMBED_TYPE" >&6; }

  PHP_VAR_SUBST="$PHP_VAR_SUBST LIBPHP_CFLAGS"



  if test "$PHP_EMBED_TYPE" = "program"; then
    PHP_BINARIES="$PHP_BINARIES embed"
  elif test "$PHP_SAPI" != "none"; then
    as_fn_error $? "
+--------------------------------------------------------------------+
|                        *** ATTENTION ***                           |
|                                                                    |
| You've configured multiple SAPIs to be built. You can build only   |
| one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
+--------------------------------------------------------------------+
" "$LINENO" 5
  else
    PHP_SAPI=embed
  fi

  as_fn_append BUILD_DIR " sapi/embed"


  PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS embed"


    case "$PHP_EMBED_TYPE" in
    static)

  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

  OVERALL_TARGET=libphp.la
  php_sapi_module=static
;;
    shared)

  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

  OVERALL_TARGET=libphp.la
  php_sapi_module=shared

  php_c_pre=$shared_c_pre
  php_c_meta=$shared_c_meta
  php_c_post=$shared_c_post
  php_cxx_pre=$shared_cxx_pre
  php_cxx_meta=$shared_cxx_meta
  php_cxx_post=$shared_cxx_post
  php_lo=$shared_lo
;;
    shared-dylib)


  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

  OVERALL_TARGET=libphp.la
  php_sapi_module=shared

  php_c_pre=$shared_c_pre
  php_c_meta=$shared_c_meta
  php_c_post=$shared_c_post
  php_cxx_pre=$shared_cxx_pre
  php_cxx_meta=$shared_cxx_meta
  php_cxx_post=$shared_cxx_post
  php_lo=$shared_lo

  OVERALL_TARGET=libphp.dylib
;;
    bundle)

  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

  OVERALL_TARGET=libs/libphp.bundle
  php_sapi_module=static
;;
    esac
    install_sapi="install-sapi"


  case sapi/embed in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/embed"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/embed/"; ac_bdir="sapi/embed/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_embed.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done





    header_path=sapi/embed
    for header_file in php_embed.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done


   ;;
esac
fi
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi





php_enable_fpm=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FPM build" >&5
printf %s "checking for FPM build... " >&6; }
# Check whether --enable-fpm was given.
if test ${enable_fpm+y}
then :
  enableval=$enable_fpm; PHP_FPM=$enableval
else case e in #(
  e)
  PHP_FPM=no

 ;;
esac
fi


ext_output=$PHP_FPM
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }


















if test "$PHP_FPM" != "no"; then


  for ac_func in clock_gettime
do :
  ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
if test "x$ac_cv_func_clock_gettime" = xyes
then :
  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h

else case e in #(
  e)
  LIBS_save=$LIBS
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
printf %s "checking for library containing clock_gettime... " >&6; }
if test ${ac_cv_search_clock_gettime+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char clock_gettime (void);
int
main (void)
{
return clock_gettime ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_clock_gettime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_clock_gettime+y}
then :
  break
fi
done
if test ${ac_cv_search_clock_gettime+y}
then :

else case e in #(
  e) ac_cv_search_clock_gettime=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

    ac_cv_func_clock_gettime=yes
    printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h

    if test "x$ac_cv_search_clock_gettime" = x"none required"
then :

else case e in #(
  e) as_fn_append FPM_EXTRA_LIBS " $ac_cv_search_clock_gettime" ;;
esac
fi

fi

  LIBS=$LIBS_save
 ;;
esac
fi

done

if test "x$ac_cv_func_clock_gettime" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_get_time" >&5
printf %s "checking for clock_get_time... " >&6; }
if test ${php_cv_func_clock_get_time+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_func_clock_get_time=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

      #include <mach/mach.h>
      #include <mach/clock.h>
      #include <mach/mach_error.h>

      int main(void)
      {
        kern_return_t ret; clock_serv_t aClock; mach_timespec_t aTime;
        ret = host_get_clock_service(mach_host_self(), REALTIME_CLOCK, &aClock);

        if (ret != KERN_SUCCESS) {
          return 1;
        }

        ret = clock_get_time(aClock, &aTime);
        if (ret != KERN_SUCCESS) {
          return 2;
        }

        return 0;
      }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_clock_get_time=yes
else case e in #(
  e) php_cv_func_clock_get_time=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_clock_get_time" >&5
printf "%s\n" "$php_cv_func_clock_get_time" >&6; }
  if test "x$php_cv_func_clock_get_time" = xyes
then :

printf "%s\n" "#define HAVE_CLOCK_GET_TIME 1" >>confdefs.h

fi

fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptrace" >&5
printf %s "checking for ptrace... " >&6; }
if test ${php_cv_func_ptrace+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

    #include <sys/types.h>
    #include <sys/ptrace.h>

int
main (void)
{
ptrace(0, 0, (void *) 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  if test "$cross_compiling" = yes
then :
  php_cv_func_ptrace=yes
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

      #include <unistd.h>
      #include <signal.h>
      #include <sys/wait.h>
      #include <sys/types.h>
      #include <sys/ptrace.h>
      #include <errno.h>

      #if !defined(PTRACE_ATTACH) && defined(PT_ATTACH)
      #define PTRACE_ATTACH PT_ATTACH
      #endif

      #if !defined(PTRACE_DETACH) && defined(PT_DETACH)
      #define PTRACE_DETACH PT_DETACH
      #endif

      #if !defined(PTRACE_PEEKDATA) && defined(PT_READ_D)
      #define PTRACE_PEEKDATA PT_READ_D
      #endif

      int main(void)
      {
        /* copy will fail if sizeof(long) == 8 and we've got "int ptrace()" */
        long v1 = (unsigned int) -1;
        long v2;
        pid_t child;
        int status;

        if ( (child = fork()) ) { /* parent */
          int ret = 0;

          if (0 > ptrace(PTRACE_ATTACH, child, 0, 0)) {
            return 2;
          }

          waitpid(child, &status, 0);

      #ifdef PT_IO
          struct ptrace_io_desc ptio = {
            .piod_op = PIOD_READ_D,
            .piod_offs = &v1,
            .piod_addr = &v2,
            .piod_len = sizeof(v1)
          };

          if (0 > ptrace(PT_IO, child, (void *) &ptio, 0)) {
            ret = 3;
          }
      #else
          errno = 0;

          v2 = ptrace(PTRACE_PEEKDATA, child, (void *) &v1, 0);

          if (errno) {
            ret = 4;
          }
      #endif
          ptrace(PTRACE_DETACH, child, (void *) 1, 0);

          kill(child, SIGKILL);

          return ret ? ret : (v1 != v2);
        }
        else { /* child */
          sleep(10);
          return 0;
        }
      }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_ptrace=yes
else case e in #(
  e) php_cv_func_ptrace=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

else case e in #(
  e) php_cv_func_ptrace=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_ptrace" >&5
printf "%s\n" "$php_cv_func_ptrace" >&6; }

if test "x$php_cv_func_ptrace" = xyes
then :

printf "%s\n" "#define HAVE_PTRACE 1" >>confdefs.h

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach_vm_read" >&5
printf %s "checking for mach_vm_read... " >&6; }
if test ${php_cv_func_mach_vm_read+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <mach/mach.h>
      #include <mach/mach_vm.h>

int
main (void)
{

      mach_vm_read(
        (vm_map_t)0,
        (mach_vm_address_t)0,
        (mach_vm_size_t)0,
        (vm_offset_t *)0,
        (mach_msg_type_number_t*)0);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_func_mach_vm_read=yes
else case e in #(
  e) php_cv_func_mach_vm_read=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_mach_vm_read" >&5
printf "%s\n" "$php_cv_func_mach_vm_read" >&6; }
 ;;
esac
fi

if test "x$php_cv_func_mach_vm_read" = xyes
then :

printf "%s\n" "#define HAVE_MACH_VM_READ 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for proc mem file" >&5
printf %s "checking for proc mem file... " >&6; }
if test ${php_cv_file_proc_mem+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -r /proc/$$/mem
then :
  proc_mem_file=mem
elif test -r /proc/$$/as
then :
  proc_mem_file=as
else case e in #(
  e) proc_mem_file= ;;
esac
fi

if ${proc_mem_file:+false} :
then :

else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_file_proc_mem=$proc_mem_file
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

      #ifndef _GNU_SOURCE
      #define _GNU_SOURCE
      #endif
      #define _FILE_OFFSET_BITS 64
      #include <stdint.h>
      #include <unistd.h>
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <fcntl.h>
      #include <stdio.h>
      int main(void)
      {
        long v1 = (unsigned int) -1, v2 = 0;
        char buf[128];
        int fd;
        sprintf(buf, "/proc/%d/$proc_mem_file", getpid());
        fd = open(buf, O_RDONLY);
        if (0 > fd) {
          return 1;
        }
        if (sizeof(long) != pread(fd, &v2, sizeof(long), (uintptr_t) &v1)) {
          close(fd);
          return 1;
        }
        close(fd);
        return v1 != v2;
      }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_file_proc_mem=$proc_mem_file
else case e in #(
  e) php_cv_file_proc_mem= ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

   ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_file_proc_mem" >&5
printf "%s\n" "$php_cv_file_proc_mem" >&6; }

if ${php_cv_file_proc_mem:+false} :
then :

else case e in #(
  e)
printf "%s\n" "#define PROC_MEM_FILE \"$php_cv_file_proc_mem\"" >>confdefs.h
 ;;
esac
fi

if test "x$php_cv_func_ptrace" = xyes
then :
  fpm_trace_type=ptrace
elif test -n "$php_cv_file_proc_mem"
then :
  fpm_trace_type=pread
elif test "x$php_cv_func_mach_vm_read" = xyes
then :
  fpm_trace_type=mach
else case e in #(
  e) fpm_trace_type= ;;
esac
fi

if ${fpm_trace_type:+false} :
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: FPM Trace - ptrace, pread, or mach: could not be found" >&5
printf "%s\n" "$as_me: WARNING: FPM Trace - ptrace, pread, or mach: could not be found" >&2;}
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports __sync_bool_compare_and_swap" >&5
printf %s "checking if compiler supports __sync_bool_compare_and_swap... " >&6; }
if test ${php_cv_have___sync_bool_compare_and_swap+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

    int variable = 1;
    return (__sync_bool_compare_and_swap(&variable, 1, 2)
           && __sync_add_and_fetch(&variable, 1)) ? 1 : 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___sync_bool_compare_and_swap=yes
else case e in #(
  e) php_cv_have___sync_bool_compare_and_swap=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___sync_bool_compare_and_swap" >&5
printf "%s\n" "$php_cv_have___sync_bool_compare_and_swap" >&6; }
if test "x$php_cv_have___sync_bool_compare_and_swap" = xyes
then :

printf "%s\n" "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h

fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TCP_INFO" >&5
printf %s "checking for TCP_INFO... " >&6; }
if test ${php_cv_have_TCP_INFO+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <netinet/tcp.h>
int
main (void)
{

    struct tcp_info ti;
    int x = TCP_INFO;
    (void)ti;
    (void)x;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_TCP_INFO=yes
else case e in #(
  e) php_cv_have_TCP_INFO=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_TCP_INFO" >&5
printf "%s\n" "$php_cv_have_TCP_INFO" >&6; }
if test "x$php_cv_have_TCP_INFO" = xyes
then :

printf "%s\n" "#define HAVE_LQ_TCP_INFO 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TCP_CONNECTION_INFO" >&5
printf %s "checking for TCP_CONNECTION_INFO... " >&6; }
if test ${php_cv_have_TCP_CONNECTION_INFO+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <netinet/tcp.h>
int
main (void)
{

    struct tcp_connection_info ti;
    int x = TCP_CONNECTION_INFO;
    (void)ti;
    (void)x;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_TCP_CONNECTION_INFO=yes
else case e in #(
  e) php_cv_have_TCP_CONNECTION_INFO=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_TCP_CONNECTION_INFO" >&5
printf "%s\n" "$php_cv_have_TCP_CONNECTION_INFO" >&6; }
if test "x$php_cv_have_TCP_CONNECTION_INFO" = xyes
then :

printf "%s\n" "#define HAVE_LQ_TCP_CONNECTION_INFO 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SO_LISTENQLEN" >&5
printf %s "checking for SO_LISTENQLEN... " >&6; }
if test ${php_cv_have_SO_LISTENQLEN+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/socket.h>
int
main (void)
{

    int x = SO_LISTENQLIMIT;
    int y = SO_LISTENQLEN;
    (void)x;
    (void)y;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_SO_LISTENQLEN=yes
else case e in #(
  e) php_cv_have_SO_LISTENQLEN=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_SO_LISTENQLEN" >&5
printf "%s\n" "$php_cv_have_SO_LISTENQLEN" >&6; }
if test "x$php_cv_have_SO_LISTENQLEN" = xyes
then :

printf "%s\n" "#define HAVE_LQ_SO_LISTENQ 1" >>confdefs.h

fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
printf %s "checking for kqueue... " >&6; }
if test ${php_cv_have_kqueue+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
    #include <sys/types.h>
    #include <sys/event.h>
    #include <sys/time.h>

int
main (void)
{
    int kfd;
    struct kevent k;
    kfd = kqueue();
    /* 0 -> STDIN_FILENO */
    EV_SET(&k, 0, EVFILT_READ , EV_ADD | EV_CLEAR, 0, 0, NULL);
    (void)kfd;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_kqueue=yes
else case e in #(
  e) php_cv_have_kqueue=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_kqueue" >&5
printf "%s\n" "$php_cv_have_kqueue" >&6; }
if test "x$php_cv_have_kqueue" = xyes
then :

printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h

fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
printf %s "checking for epoll... " >&6; }
if test ${php_cv_have_epoll+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/epoll.h>
int
main (void)
{
    int epollfd;
    struct epoll_event e;

    epollfd = epoll_create(1);
    if (epollfd < 0) {
      return 1;
    }

    e.events = EPOLLIN | EPOLLET;
    e.data.fd = 0;

    if (epoll_ctl(epollfd, EPOLL_CTL_ADD, 0, &e) == -1) {
      return 1;
    }

    e.events = 0;
    if (epoll_wait(epollfd, &e, 1, 1) < 0) {
      return 1;
    }

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_epoll=yes
else case e in #(
  e) php_cv_have_epoll=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_epoll" >&5
printf "%s\n" "$php_cv_have_epoll" >&6; }
if test "x$php_cv_have_epoll" = xyes
then :

printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h

fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for select" >&5
printf %s "checking for select... " >&6; }
if test ${php_cv_have_select+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
    /* According to POSIX.1-2001 */
    #include <sys/select.h>

    /* According to earlier standards */
    #include <sys/time.h>
    #include <sys/types.h>
    #include <unistd.h>

int
main (void)
{
    fd_set fds;
    struct timeval t;
    t.tv_sec = 0;
    t.tv_usec = 42;
    FD_ZERO(&fds);
    /* 0 -> STDIN_FILENO */
    FD_SET(0, &fds);
    select(FD_SETSIZE, &fds, NULL, NULL, &t);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_select=yes
else case e in #(
  e) php_cv_have_select=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_select" >&5
printf "%s\n" "$php_cv_have_select" >&6; }
if test "x$php_cv_have_select" = xyes
then :

printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h

fi


  ac_fn_c_check_func "$LINENO" "clearenv" "ac_cv_func_clearenv"
if test "x$ac_cv_func_clearenv" = xyes
then :
  printf "%s\n" "#define HAVE_CLEARENV 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
if test "x$ac_cv_func_setproctitle" = xyes
then :
  printf "%s\n" "#define HAVE_SETPROCTITLE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setproctitle_fast" "ac_cv_func_setproctitle_fast"
if test "x$ac_cv_func_setproctitle_fast" = xyes
then :
  printf "%s\n" "#define HAVE_SETPROCTITLE_FAST 1" >>confdefs.h

fi


  ac_fn_c_check_header_compile "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
if test "x$ac_cv_header_priv_h" = xyes
then :
  ac_fn_c_check_func "$LINENO" "setpflags" "ac_cv_func_setpflags"
if test "x$ac_cv_func_setpflags" = xyes
then :
  printf "%s\n" "#define HAVE_SETPFLAGS 1" >>confdefs.h

fi

fi

  ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_times_h" = xyes
then :
  ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
if test "x$ac_cv_func_times" = xyes
then :
  printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h

fi

fi

  ac_fn_c_check_header_compile "$LINENO" "port.h" "ac_cv_header_port_h" "$ac_includes_default"
if test "x$ac_cv_header_port_h" = xyes
then :
  ac_fn_c_check_func "$LINENO" "port_create" "ac_cv_func_port_create"
if test "x$ac_cv_func_port_create" = xyes
then :
  printf "%s\n" "#define HAVE_PORT_CREATE 1" >>confdefs.h

fi

fi



php_with_fpm_user=nobody



# Check whether --with-fpm-user was given.
if test ${with_fpm_user+y}
then :
  withval=$with_fpm_user; PHP_FPM_USER=$withval
else case e in #(
  e)
  PHP_FPM_USER=nobody

 ;;
esac
fi


ext_output=$PHP_FPM_USER






php_with_fpm_group=nobody



# Check whether --with-fpm-group was given.
if test ${with_fpm_group+y}
then :
  withval=$with_fpm_group; PHP_FPM_GROUP=$withval
else case e in #(
  e)
  PHP_FPM_GROUP=nobody

 ;;
esac
fi


ext_output=$PHP_FPM_GROUP






php_with_fpm_systemd=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable systemd integration in PHP-FPM" >&5
printf %s "checking whether to enable systemd integration in PHP-FPM... " >&6; }

# Check whether --with-fpm-systemd was given.
if test ${with_fpm_systemd+y}
then :
  withval=$with_fpm_systemd; PHP_FPM_SYSTEMD=$withval
else case e in #(
  e)
  PHP_FPM_SYSTEMD=no

 ;;
esac
fi


ext_output=$PHP_FPM_SYSTEMD
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_fpm_acl=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use Access Control Lists (ACL) in PHP-FPM" >&5
printf %s "checking whether to use Access Control Lists (ACL) in PHP-FPM... " >&6; }

# Check whether --with-fpm-acl was given.
if test ${with_fpm_acl+y}
then :
  withval=$with_fpm_acl; PHP_FPM_ACL=$withval
else case e in #(
  e)
  PHP_FPM_ACL=no

 ;;
esac
fi


ext_output=$PHP_FPM_ACL
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_fpm_apparmor=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable AppArmor confinement in PHP-FPM" >&5
printf %s "checking whether to enable AppArmor confinement in PHP-FPM... " >&6; }

# Check whether --with-fpm-apparmor was given.
if test ${with_fpm_apparmor+y}
then :
  withval=$with_fpm_apparmor; PHP_FPM_APPARMOR=$withval
else case e in #(
  e)
  PHP_FPM_APPARMOR=no

 ;;
esac
fi


ext_output=$PHP_FPM_APPARMOR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_fpm_selinux=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable SELinux support in PHP-FPM" >&5
printf %s "checking whether to enable SELinux support in PHP-FPM... " >&6; }

# Check whether --with-fpm-selinux was given.
if test ${with_fpm_selinux+y}
then :
  withval=$with_fpm_selinux; PHP_FPM_SELINUX=$withval
else case e in #(
  e)
  PHP_FPM_SELINUX=no

 ;;
esac
fi


ext_output=$PHP_FPM_SELINUX
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




  if test "x$PHP_FPM_SYSTEMD" = xno
then :
  php_fpm_systemd=simple
else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsystemd >= 209" >&5
printf %s "checking for libsystemd >= 209... " >&6; }

if test -n "$SYSTEMD_CFLAGS"; then
    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$SYSTEMD_LIBS"; then
    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1`
        else
	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$SYSTEMD_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libsystemd >= 209) were not met:

$SYSTEMD_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SYSTEMD_CFLAGS
and SYSTEMD_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables SYSTEMD_CFLAGS
and SYSTEMD_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h

    PHP_FPM_SD_FILES="fpm/fpm_systemd.c"
    _php_ext_shared_saved=$ext_shared; ext_shared=yes
  for ac_i in $SYSTEMD_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  FPM_EXTRA_LIBS="$FPM_EXTRA_LIBS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        FPM_EXTRA_LIBS="$FPM_EXTRA_LIBS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        FPM_EXTRA_LIBS="-L$ai_p $FPM_EXTRA_LIBS"
        test -n "$ld_runpath_switch" && FPM_EXTRA_LIBS="$ld_runpath_switch$ai_p $FPM_EXTRA_LIBS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done
ext_shared=$_php_ext_shared_saved

  for ac_i in $SYSTEMD_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


    php_fpm_systemd=notify

        CFLAGS_save=$CFLAGS
    CFLAGS="$INCLUDES $CFLAGS"
    ac_fn_c_check_header_compile "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required <systemd/sd-daemon.h> header file not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

    CFLAGS=$CFLAGS_save
   ;;
esac
fi



  if test "x$PHP_FPM_ACL" = xno
then :

else case e in #(
  e)
    ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_acl_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h

fi


        LIBS_save=$LIBS
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing acl_free" >&5
printf %s "checking for library containing acl_free... " >&6; }
if test ${ac_cv_search_acl_free+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char acl_free (void);
int
main (void)
{
return acl_free ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' acl
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_acl_free=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_acl_free+y}
then :
  break
fi
done
if test ${ac_cv_search_acl_free+y}
then :

else case e in #(
  e) ac_cv_search_acl_free=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_free" >&5
printf "%s\n" "$ac_cv_search_acl_free" >&6; }
ac_res=$ac_cv_search_acl_free
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ACL user/group permissions support" >&5
printf %s "checking for ACL user/group permissions support... " >&6; }
if test ${php_cv_lib_acl_user_group+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/acl.h>
int
main (void)
{

        acl_t acl;
        acl_entry_t user, group;
        acl = acl_init(1);
        acl_create_entry(&acl, &user);
        acl_set_tag_type(user, ACL_USER);
        acl_create_entry(&acl, &group);
        acl_set_tag_type(user, ACL_GROUP);
        acl_free(acl);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_lib_acl_user_group=yes
else case e in #(
  e) php_cv_lib_acl_user_group=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_acl_user_group" >&5
printf "%s\n" "$php_cv_lib_acl_user_group" >&6; }
      if test "x$php_cv_lib_acl_user_group" = xyes
then :


printf "%s\n" "#define HAVE_FPM_ACL 1" >>confdefs.h

        if test "x$ac_cv_search_acl_free" = x"none required"
then :

else case e in #(
  e) as_fn_append FPM_EXTRA_LIBS " $ac_cv_search_acl_free" ;;
esac
fi

fi

fi

    LIBS=$LIBS_save
   ;;
esac
fi

  if test "x$PHP_FPM_APPARMOR" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libapparmor" >&5
printf %s "checking for libapparmor... " >&6; }

if test -n "$APPARMOR_CFLAGS"; then
    pkg_cv_APPARMOR_CFLAGS="$APPARMOR_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libapparmor\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libapparmor") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_APPARMOR_CFLAGS=`$PKG_CONFIG --cflags "libapparmor" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$APPARMOR_LIBS"; then
    pkg_cv_APPARMOR_LIBS="$APPARMOR_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libapparmor\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libapparmor") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_APPARMOR_LIBS=`$PKG_CONFIG --libs "libapparmor" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        APPARMOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libapparmor" 2>&1`
        else
	        APPARMOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libapparmor" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$APPARMOR_PKG_ERRORS" >&5

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for aa_change_profile in -lapparmor" >&5
printf %s "checking for aa_change_profile in -lapparmor... " >&6; }
if test ${ac_cv_lib_apparmor_aa_change_profile+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lapparmor  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char aa_change_profile (void);
int
main (void)
{
return aa_change_profile ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_apparmor_aa_change_profile=yes
else case e in #(
  e) ac_cv_lib_apparmor_aa_change_profile=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_apparmor_aa_change_profile" >&5
printf "%s\n" "$ac_cv_lib_apparmor_aa_change_profile" >&6; }
if test "x$ac_cv_lib_apparmor_aa_change_profile" = xyes
then :
  APPARMOR_LIBS=-lapparmor
else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required libapparmor library not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for aa_change_profile in -lapparmor" >&5
printf %s "checking for aa_change_profile in -lapparmor... " >&6; }
if test ${ac_cv_lib_apparmor_aa_change_profile+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lapparmor  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char aa_change_profile (void);
int
main (void)
{
return aa_change_profile ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_apparmor_aa_change_profile=yes
else case e in #(
  e) ac_cv_lib_apparmor_aa_change_profile=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_apparmor_aa_change_profile" >&5
printf "%s\n" "$ac_cv_lib_apparmor_aa_change_profile" >&6; }
if test "x$ac_cv_lib_apparmor_aa_change_profile" = xyes
then :
  APPARMOR_LIBS=-lapparmor
else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required libapparmor library not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

else
	APPARMOR_CFLAGS=$pkg_cv_APPARMOR_CFLAGS
	APPARMOR_LIBS=$pkg_cv_APPARMOR_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

  for ac_i in $APPARMOR_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done

fi
    _php_ext_shared_saved=$ext_shared; ext_shared=yes
  for ac_i in $APPARMOR_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  FPM_EXTRA_LIBS="$FPM_EXTRA_LIBS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        FPM_EXTRA_LIBS="$FPM_EXTRA_LIBS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        FPM_EXTRA_LIBS="-L$ai_p $FPM_EXTRA_LIBS"
        test -n "$ld_runpath_switch" && FPM_EXTRA_LIBS="$ld_runpath_switch$ai_p $FPM_EXTRA_LIBS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done
ext_shared=$_php_ext_shared_saved

        CFLAGS_save=$CFLAGS
    CFLAGS="$INCLUDES $CFLAGS"
    ac_fn_c_check_header_compile "$LINENO" "sys/apparmor.h" "ac_cv_header_sys_apparmor_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_apparmor_h" = xyes
then :

printf "%s\n" "#define HAVE_APPARMOR 1" >>confdefs.h

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required <sys/apparmor.h> header file not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

    CFLAGS=$CFLAGS_save
   ;;
esac
fi

  if test "x$PHP_FPM_SELINUX" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libselinux" >&5
printf %s "checking for libselinux... " >&6; }

if test -n "$SELINUX_CFLAGS"; then
    pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libselinux") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SELINUX_CFLAGS=`$PKG_CONFIG --cflags "libselinux" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$SELINUX_LIBS"; then
    pkg_cv_SELINUX_LIBS="$SELINUX_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libselinux") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SELINUX_LIBS=`$PKG_CONFIG --libs "libselinux" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        SELINUX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libselinux" 2>&1`
        else
	        SELINUX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libselinux" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$SELINUX_PKG_ERRORS" >&5

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for security_setenforce in -lselinux" >&5
printf %s "checking for security_setenforce in -lselinux... " >&6; }
if test ${ac_cv_lib_selinux_security_setenforce+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lselinux  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char security_setenforce (void);
int
main (void)
{
return security_setenforce ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_selinux_security_setenforce=yes
else case e in #(
  e) ac_cv_lib_selinux_security_setenforce=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_setenforce" >&5
printf "%s\n" "$ac_cv_lib_selinux_security_setenforce" >&6; }
if test "x$ac_cv_lib_selinux_security_setenforce" = xyes
then :
  SELINUX_LIBS=-lselinux
else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required SELinux library not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for security_setenforce in -lselinux" >&5
printf %s "checking for security_setenforce in -lselinux... " >&6; }
if test ${ac_cv_lib_selinux_security_setenforce+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lselinux  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char security_setenforce (void);
int
main (void)
{
return security_setenforce ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_selinux_security_setenforce=yes
else case e in #(
  e) ac_cv_lib_selinux_security_setenforce=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_setenforce" >&5
printf "%s\n" "$ac_cv_lib_selinux_security_setenforce" >&6; }
if test "x$ac_cv_lib_selinux_security_setenforce" = xyes
then :
  SELINUX_LIBS=-lselinux
else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required SELinux library not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

else
	SELINUX_CFLAGS=$pkg_cv_SELINUX_CFLAGS
	SELINUX_LIBS=$pkg_cv_SELINUX_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

  for ac_i in $SELINUX_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done

fi
    _php_ext_shared_saved=$ext_shared; ext_shared=yes
  for ac_i in $SELINUX_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  FPM_EXTRA_LIBS="$FPM_EXTRA_LIBS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        FPM_EXTRA_LIBS="$FPM_EXTRA_LIBS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        FPM_EXTRA_LIBS="-L$ai_p $FPM_EXTRA_LIBS"
        test -n "$ld_runpath_switch" && FPM_EXTRA_LIBS="$ld_runpath_switch$ai_p $FPM_EXTRA_LIBS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done
ext_shared=$_php_ext_shared_saved

        CFLAGS_save=$CFLAGS
    CFLAGS="$INCLUDES $CFLAGS"
    ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
if test "x$ac_cv_header_selinux_selinux_h" = xyes
then :

printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required <selinux/selinux.h> header file not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

    CFLAGS=$CFLAGS_save
   ;;
esac
fi

  if test -z "$PHP_FPM_USER" || test "$PHP_FPM_USER" = "yes" || test "$PHP_FPM_USER" = "no"; then
    php_fpm_user=nobody
  else
    php_fpm_user=$PHP_FPM_USER
  fi

  if test -z "$PHP_FPM_GROUP" || test "$PHP_FPM_GROUP" = "yes" || test "$PHP_FPM_GROUP" = "no"; then
    php_fpm_group=nobody
  else
    php_fpm_group=$PHP_FPM_GROUP
  fi



  php_fpm_sysconfdir=$(eval echo $sysconfdir)

  php_fpm_localstatedir=$(eval echo $localstatedir)

  php_fpm_prefix=$(eval echo $prefix)


  as_fn_append BUILD_DIR " sapi/fpm/fpm sapi/fpm/fpm/events"

  ac_config_files="$ac_config_files sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.8 sapi/fpm/php-fpm.conf sapi/fpm/php-fpm.service sapi/fpm/status.html sapi/fpm/www.conf"

    src=$abs_srcdir/sapi/fpm/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments


  SAPI_FPM_PATH=sapi/fpm/php-fpm

  if ${fpm_trace_type:+false} :
then :

else case e in #(
  e) if test -f "$abs_srcdir/sapi/fpm/fpm/fpm_trace_$fpm_trace_type.c"
then :
  PHP_FPM_TRACE_FILES="fpm/fpm_trace.c fpm/fpm_trace_$fpm_trace_type.c"
fi ;;
esac
fi

  PHP_FPM_FILES="fpm/fpm.c \
    fpm/fpm_children.c \
    fpm/fpm_cleanup.c \
    fpm/fpm_clock.c \
    fpm/fpm_conf.c \
    fpm/fpm_env.c \
    fpm/fpm_events.c \
    fpm/fpm_log.c \
    fpm/fpm_main.c \
    fpm/fpm_php.c \
    fpm/fpm_php_trace.c \
    fpm/fpm_process_ctl.c \
    fpm/fpm_request.c \
    fpm/fpm_shm.c \
    fpm/fpm_scoreboard.c \
    fpm/fpm_signals.c \
    fpm/fpm_sockets.c \
    fpm/fpm_status.c \
    fpm/fpm_stdio.c \
    fpm/fpm_unix.c \
    fpm/fpm_worker_pool.c \
    fpm/zlog.c \
    fpm/events/select.c \
    fpm/events/poll.c \
    fpm/events/epoll.c \
    fpm/events/kqueue.c \
    fpm/events/port.c \
  "


  if test "program" = "program"; then
    PHP_BINARIES="$PHP_BINARIES fpm"
  elif test "$PHP_SAPI" != "none"; then
    as_fn_error $? "
+--------------------------------------------------------------------+
|                        *** ATTENTION ***                           |
|                                                                    |
| You've configured multiple SAPIs to be built. You can build only   |
| one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
+--------------------------------------------------------------------+
" "$LINENO" 5
  else
    PHP_SAPI=fpm
  fi

  as_fn_append BUILD_DIR " sapi/fpm"


  PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS fpm"



  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

    install_binaries="install-binaries"
    install_binary_targets="$install_binary_targets install-fpm"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FPM_OBJS"


  case sapi/fpm in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fpm"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fpm/"; ac_bdir="sapi/fpm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $PHP_FPM_FILES $PHP_FPM_TRACE_FILES $PHP_FPM_SD_FILES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FPM_OBJS="$PHP_FPM_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -I$abs_srcdir/sapi/fpm -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -I$abs_srcdir/sapi/fpm -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -I$abs_srcdir/sapi/fpm -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -I$abs_srcdir/sapi/fpm -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done




  case $host_alias in #(
  *aix*) :

      BUILD_FPM="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FPM_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
     ;; #(
  *darwin*) :

      BUILD_FPM="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_FPM_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
     ;; #(
  *) :

      BUILD_FPM="\$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_FPM_OBJS:.lo=.o) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
     ;;
esac


  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_FPM_PATH"


  PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_FPM"


  PHP_VAR_SUBST="$PHP_VAR_SUBST FPM_EXTRA_LIBS"

fi





php_enable_fuzzer=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Clang fuzzer SAPI" >&5
printf %s "checking for Clang fuzzer SAPI... " >&6; }
# Check whether --enable-fuzzer was given.
if test ${enable_fuzzer+y}
then :
  enableval=$enable_fuzzer; PHP_FUZZER=$enableval
else case e in #(
  e)
  PHP_FUZZER=no

 ;;
esac
fi


ext_output=$PHP_FUZZER
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }







if test "$PHP_FUZZER" != "no"; then
  if test "x$enable_zts" = xyes
then :
  as_fn_error $? "Thread safety (--enable-zts) is not supported when building fuzzing module
(--enable-fuzzer). Please build fuzzer without ZTS." "$LINENO" 5
fi







ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
printf "%s\n" "$CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
printf "%s\n" "$ac_ct_CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
printf %s "checking whether the compiler supports GNU C++... " >&6; }
if test ${ac_cv_cxx_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else case e in #(
  e) ac_compiler_gnu=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+y}
ac_save_CXXFLAGS=$CXXFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
printf %s "checking whether $CXX accepts -g... " >&6; }
if test ${ac_cv_prog_cxx_g+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
else case e in #(
  e) CXXFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :

else case e in #(
  e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
if test $ac_test_CXXFLAGS; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_prog_cxx_stdcxx=no
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx11+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cxx_cxx11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx11_program
_ACEOF
for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX ;;
esac
fi

if test "x$ac_cv_prog_cxx_cxx11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cxx_cxx11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx11" ;;
esac
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
  ac_prog_cxx_stdcxx=cxx11 ;;
esac
fi
fi
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx98+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cxx_cxx98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx98_program
_ACEOF
for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx98=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX ;;
esac
fi

if test "x$ac_cv_prog_cxx_cxx98" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cxx_cxx98" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx98" ;;
esac
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
  ac_prog_cxx_stdcxx=cxx98 ;;
esac
fi
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
printf %s "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
  if test ${ac_cv_prog_CXXCPP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)     # Double quotes because $CXX needs to be expanded
    for CXXCPP in "$CXX -E" cpp /lib/cpp
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
  break
fi

    done
    ac_cv_prog_CXXCPP=$CXXCPP
   ;;
esac
fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
printf "%s\n" "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    src=$abs_srcdir/sapi/fuzzer/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

  SAPI_FUZZER_PATH=sapi/fuzzer

  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_FUZZER_PATH"

  if ${LIB_FUZZING_ENGINE:+false} :
then :

    FUZZING_LIB="-fsanitize=fuzzer"
    FUZZING_CC=$CC
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=fuzzer-no-link" >&5
printf %s "checking whether the C compiler accepts -fsanitize=fuzzer-no-link... " >&6; }
if test ${ax_cv_check_cflags___fsanitize_fuzzer_no_link+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -fsanitize=fuzzer-no-link $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___fsanitize_fuzzer_no_link=yes
else case e in #(
  e) ax_cv_check_cflags___fsanitize_fuzzer_no_link=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_fuzzer_no_link" >&5
printf "%s\n" "$ax_cv_check_cflags___fsanitize_fuzzer_no_link" >&6; }
if test "x$ax_cv_check_cflags___fsanitize_fuzzer_no_link" = xyes
then :

      CFLAGS="$CFLAGS -fsanitize=fuzzer-no-link"
      CXXFLAGS="$CXXFLAGS -fsanitize=fuzzer-no-link"

else case e in #(
  e) as_fn_error $? "Compiler doesn't support -fsanitize=fuzzer-no-link" "$LINENO" 5 ;;
esac
fi


else case e in #(
  e)
    FUZZING_LIB=$LIB_FUZZING_ENGINE
    FUZZING_CC="$CXX -stdlib=libc++"
   ;;
esac
fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST FUZZING_LIB"


  PHP_VAR_SUBST="$PHP_VAR_SUBST FUZZING_CC"



  as_fn_append BUILD_DIR " sapi/fuzzer"

  PHP_FUZZER_BINARIES=""
  PHP_BINARIES="$PHP_BINARIES fuzzer"
  PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS fuzzer"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-sapi.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      FUZZER_COMMON_OBJS="$FUZZER_COMMON_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done



  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-parser"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_PARSER_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_PARSER_OBJS="$PHP_FUZZER_PARSER_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_PARSER_OBJS="$PHP_FUZZER_PARSER_OBJS $FUZZER_COMMON_OBJS"


  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-execute"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_EXECUTE_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-execute.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_EXECUTE_OBJS="$PHP_FUZZER_EXECUTE_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_EXECUTE_OBJS="$PHP_FUZZER_EXECUTE_OBJS $FUZZER_COMMON_OBJS"


  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-function-jit"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_FUNCTION_JIT_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-function-jit.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_FUNCTION_JIT_OBJS="$PHP_FUZZER_FUNCTION_JIT_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_FUNCTION_JIT_OBJS="$PHP_FUZZER_FUNCTION_JIT_OBJS $FUZZER_COMMON_OBJS"


  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-tracing-jit"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_TRACING_JIT_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-tracing-jit.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_TRACING_JIT_OBJS="$PHP_FUZZER_TRACING_JIT_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_TRACING_JIT_OBJS="$PHP_FUZZER_TRACING_JIT_OBJS $FUZZER_COMMON_OBJS"


  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-unserialize"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_UNSERIALIZE_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-unserialize.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_UNSERIALIZE_OBJS="$PHP_FUZZER_UNSERIALIZE_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_UNSERIALIZE_OBJS="$PHP_FUZZER_UNSERIALIZE_OBJS $FUZZER_COMMON_OBJS"


  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-unserializehash"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_UNSERIALIZEHASH_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-unserializehash.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_UNSERIALIZEHASH_OBJS="$PHP_FUZZER_UNSERIALIZEHASH_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_UNSERIALIZEHASH_OBJS="$PHP_FUZZER_UNSERIALIZEHASH_OBJS $FUZZER_COMMON_OBJS"


  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-json"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_JSON_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-json.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_JSON_OBJS="$PHP_FUZZER_JSON_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_JSON_OBJS="$PHP_FUZZER_JSON_OBJS $FUZZER_COMMON_OBJS"


  if test -n "$enable_exif" && test "$enable_exif" != "no"; then

  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-exif"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_EXIF_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-exif.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_EXIF_OBJS="$PHP_FUZZER_EXIF_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_EXIF_OBJS="$PHP_FUZZER_EXIF_OBJS $FUZZER_COMMON_OBJS"

  fi
  if test -n "$enable_mbstring" && test "$enable_mbstring" != "no"; then

  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-mbstring"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_MBSTRING_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-mbstring.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_MBSTRING_OBJS="$PHP_FUZZER_MBSTRING_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_MBSTRING_OBJS="$PHP_FUZZER_MBSTRING_OBJS $FUZZER_COMMON_OBJS"

    if test -n "$enable_mbregex" && test "$enable_mbregex" != "no"; then

  PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-mbregex"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_MBREGEX_OBJS"


  case sapi/fuzzer in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/fuzzer"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/fuzzer/"; ac_bdir="sapi/fuzzer/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fuzzer-mbregex.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FUZZER_MBREGEX_OBJS="$PHP_FUZZER_MBREGEX_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done

  PHP_FUZZER_MBREGEX_OBJS="$PHP_FUZZER_MBREGEX_OBJS $FUZZER_COMMON_OBJS"

    fi
  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FUZZER_BINARIES"

fi





php_enable_litespeed=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LiteSpeed support" >&5
printf %s "checking for LiteSpeed support... " >&6; }
# Check whether --enable-litespeed was given.
if test ${enable_litespeed+y}
then :
  enableval=$enable_litespeed; PHP_LITESPEED=$enableval
else case e in #(
  e)
  PHP_LITESPEED=no
  test "$PHP_ENABLE_ALL" && PHP_LITESPEED=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_LITESPEED in
shared,*)
  PHP_LITESPEED=$(echo "$PHP_LITESPEED"|$SED 's/^shared,//')
  ;;
shared)
  PHP_LITESPEED=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_LITESPEED" != "no"; then
    src=$abs_srcdir/sapi/litespeed/Makefile.frag
  ac_srcdir=$abs_srcdir/sapi/litespeed
  ac_builddir=sapi/litespeed
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

  SAPI_LITESPEED_PATH=sapi/litespeed/lsphp

  if test "program" = "program"; then
    PHP_BINARIES="$PHP_BINARIES litespeed"
  elif test "$PHP_SAPI" != "none"; then
    as_fn_error $? "
+--------------------------------------------------------------------+
|                        *** ATTENTION ***                           |
|                                                                    |
| You've configured multiple SAPIs to be built. You can build only   |
| one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
+--------------------------------------------------------------------+
" "$LINENO" 5
  else
    PHP_SAPI=litespeed
  fi

  as_fn_append BUILD_DIR " sapi/litespeed"


  PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS litespeed"



  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

    install_binaries="install-binaries"
    install_binary_targets="$install_binary_targets install-litespeed"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_LITESPEED_OBJS"


  case sapi/litespeed in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/litespeed"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/litespeed/"; ac_bdir="sapi/litespeed/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in lsapi_main.c lsapilib.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_LITESPEED_OBJS="$PHP_LITESPEED_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done



  case $host_alias in #(
  *darwin*) :

      BUILD_LITESPEED="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_LITESPEED_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
     ;; #(
  *cygwin*) :

      SAPI_LITESPEED_PATH=sapi/litespeed/lsphp.exe
      BUILD_LITESPEED="\$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
     ;; #(
  *) :

      BUILD_LITESPEED="\$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_LITESPEED_OBJS:.lo=.o) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
     ;;
esac


  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_LITESPEED_PATH"


  PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_LITESPEED"

fi





php_enable_phpdbg=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for phpdbg support" >&5
printf %s "checking for phpdbg support... " >&6; }
# Check whether --enable-phpdbg was given.
if test ${enable_phpdbg+y}
then :
  enableval=$enable_phpdbg; PHP_PHPDBG=$enableval
else case e in #(
  e)
  PHP_PHPDBG=yes
  test "$PHP_ENABLE_ALL" && PHP_PHPDBG=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PHPDBG in
shared,*)
  PHP_PHPDBG=$(echo "$PHP_PHPDBG"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PHPDBG=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_enable_phpdbg_debug=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for phpdbg debug build" >&5
printf %s "checking for phpdbg debug build... " >&6; }
# Check whether --enable-phpdbg-debug was given.
if test ${enable_phpdbg_debug+y}
then :
  enableval=$enable_phpdbg_debug; PHP_PHPDBG_DEBUG=$enableval
else case e in #(
  e)
  PHP_PHPDBG_DEBUG=no

 ;;
esac
fi


ext_output=$PHP_PHPDBG_DEBUG
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_enable_phpdbg_readline=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for phpdbg readline support" >&5
printf %s "checking for phpdbg readline support... " >&6; }
# Check whether --enable-phpdbg-readline was given.
if test ${enable_phpdbg_readline+y}
then :
  enableval=$enable_phpdbg_readline; PHP_PHPDBG_READLINE=$enableval
else case e in #(
  e)
  PHP_PHPDBG_READLINE=no

 ;;
esac
fi


ext_output=$PHP_PHPDBG_READLINE
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PHPDBG" != "no"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
printf %s "checking whether termios.h defines TIOCGWINSZ... " >&6; }
if test ${ac_cv_sys_tiocgwinsz_in_termios_h+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
#include <termios.h>
const int tiocgwinsz = TIOCGWINSZ;

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_sys_tiocgwinsz_in_termios_h=yes
else case e in #(
  e) ac_cv_sys_tiocgwinsz_in_termios_h=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
printf "%s\n" "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }

if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
printf %s "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
if test ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
#include <sys/ioctl.h>
const int tiocgwinsz = TIOCGWINSZ;

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
else case e in #(
  e) ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
printf "%s\n" "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }

  if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then

printf "%s\n" "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h

  fi
fi


  PHP_PHPDBG_CFLAGS="-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
  if test "x$PHP_PHPDBG_DEBUG" = xno
then :

else case e in #(
  e) as_fn_append PHP_PHPDBG_CFLAGS " -DPHPDBG_DEBUG=1" ;;
esac
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for phpdbg and readline integration" >&5
printf %s "checking for phpdbg and readline integration... " >&6; }
  if test "$PHP_PHPDBG_READLINE" = "yes"; then
    if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then

printf "%s\n" "#define HAVE_PHPDBG_READLINE 1" >>confdefs.h

      PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS"
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
printf "%s\n" "ok" >&6; }
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: readline is not available" >&5
printf "%s\n" "readline is not available" >&6; }
    fi
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
printf "%s\n" "disabled" >&6; }
  fi



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
if test ${ac_cv_c_undeclared_builtin_options+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_save_CFLAGS=$CFLAGS
   ac_cv_c_undeclared_builtin_options='cannot detect'
   for ac_arg in '' -fno-builtin; do
     CFLAGS="$ac_save_CFLAGS $ac_arg"
     # This test program should *not* compile successfully.
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
(void) strchr;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

else case e in #(
  e) # This test program should compile successfully.
        # No library function is consistently available on
        # freestanding implementations, so test against a dummy
        # declaration.  Include always-available headers on the
        # off chance that they somehow elicit warnings.
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <float.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
extern void ac_decl (int, char *);

int
main (void)
{
(void) ac_decl (0, (char *) 0);
  (void) ac_decl;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  if test x"$ac_arg" = x
then :
  ac_cv_c_undeclared_builtin_options='none needed'
else case e in #(
  e) ac_cv_c_undeclared_builtin_options=$ac_arg ;;
esac
fi
          break
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    done
    CFLAGS=$ac_save_CFLAGS
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
  case $ac_cv_c_undeclared_builtin_options in #(
  'cannot detect') :
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot make $CC report undeclared builtins
See 'config.log' for more details" "$LINENO" 5; } ;; #(
  'none needed') :
    ac_c_undeclared_builtin_options='' ;; #(
  *) :
    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
esac

ac_fn_check_decl "$LINENO" "UFFDIO_WRITEPROTECT_MODE_WP" "ac_cv_have_decl_UFFDIO_WRITEPROTECT_MODE_WP" "#include <linux/userfaultfd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_UFFDIO_WRITEPROTECT_MODE_WP" = xyes
then :
  if test "x$enable_zts" = xyes
then :
  printf "%s\n" "#define HAVE_USERFAULTFD_WRITEFAULT 1" >>confdefs.h

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking working pthreads" >&5
printf %s "checking working pthreads... " >&6; }
        if test "x$pthreads_working" = xyes
then :

          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthreads_cflags -l$ac_cv_pthreads_lib" >&5
printf "%s\n" "$ac_cv_pthreads_cflags -l$ac_cv_pthreads_lib" >&6; }
          as_fn_append PHP_PHPDBG_CFLAGS " $ac_cv_pthreads_cflags"
          as_fn_append PHPDBG_EXTRA_LIBS " -l$ac_cv_pthreads_lib"
          printf "%s\n" "#define HAVE_USERFAULTFD_WRITEFAULT 1" >>confdefs.h


else case e in #(
  e)
          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pthreads not available" >&5
printf "%s\n" "$as_me: WARNING: pthreads not available" >&2;}
         ;;
esac
fi
       ;;
esac
fi

fi

    src=$abs_srcdir/sapi/phpdbg/Makefile.frag
  ac_srcdir=$abs_srcdir/sapi/phpdbg
  ac_builddir=sapi/phpdbg
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments


  if test "program" = "program"; then
    PHP_BINARIES="$PHP_BINARIES phpdbg"
  elif test "$PHP_SAPI" != "none"; then
    as_fn_error $? "
+--------------------------------------------------------------------+
|                        *** ATTENTION ***                           |
|                                                                    |
| You've configured multiple SAPIs to be built. You can build only   |
| one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
+--------------------------------------------------------------------+
" "$LINENO" 5
  else
    PHP_SAPI=phpdbg
  fi

  as_fn_append BUILD_DIR " sapi/phpdbg"


  PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS phpdbg"



  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

    install_binaries="install-binaries"
    install_binary_targets="$install_binary_targets install-phpdbg"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PHPDBG_OBJS"


  case sapi/phpdbg in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/phpdbg"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/phpdbg/"; ac_bdir="sapi/phpdbg/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in phpdbg_bp.c phpdbg_break.c phpdbg_btree.c phpdbg_cmd.c phpdbg_frame.c phpdbg_help.c phpdbg_info.c phpdbg_io.c phpdbg_lexer.c phpdbg_list.c phpdbg_out.c phpdbg_parser.c phpdbg_print.c phpdbg_prompt.c phpdbg_set.c phpdbg_sigsafe.c phpdbg_utils.c phpdbg_watch.c phpdbg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_PHPDBG_OBJS="$PHP_PHPDBG_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PHPDBG_CFLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PHPDBG_CFLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PHPDBG_CFLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $PHP_PHPDBG_CFLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done




  SAPI_PHPDBG_PATH="sapi/phpdbg/phpdbg"
  SAPI_PHPDBG_SHARED_PATH="sapi/phpdbg/libphpdbg.la"

  BUILD_PHPDBG="\$(LIBTOOL) --tag=CC --mode=link \
        \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \
                \$(PHP_GLOBAL_OBJS:.lo=.o) \
                \$(PHP_BINARY_OBJS:.lo=.o) \
                \$(PHP_PHPDBG_OBJS:.lo=.o) \
                \$(EXTRA_LIBS) \
                \$(PHPDBG_EXTRA_LIBS) \
                \$(ZEND_EXTRA_LIBS) \
                \$(PHP_FRAMEWORKS) \
         -o \$(SAPI_PHPDBG_PATH)"

  BUILD_PHPDBG_SHARED="\$(LIBTOOL) --tag=CC --mode=link \
        \$(CC) -shared -Wl,-soname,libphpdbg.so -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \
                \$(PHP_GLOBAL_OBJS) \
                \$(PHP_BINARY_OBJS) \
                \$(PHP_PHPDBG_OBJS) \
                \$(EXTRA_LIBS) \
                \$(PHPDBG_EXTRA_LIBS) \
                \$(ZEND_EXTRA_LIBS) \
         -o \$(SAPI_PHPDBG_SHARED_PATH)"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHPDBG_EXTRA_LIBS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_PHPDBG_PATH"


  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_PHPDBG_SHARED_PATH"


  PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_PHPDBG"


  PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_PHPDBG_SHARED"


  ac_config_files="$ac_config_files sapi/phpdbg/phpdbg.1"

fi





php_enable_cgi=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CGI build" >&5
printf %s "checking for CGI build... " >&6; }
# Check whether --enable-cgi was given.
if test ${enable_cgi+y}
then :
  enableval=$enable_cgi; PHP_CGI=$enableval
else case e in #(
  e)
  PHP_CGI=yes

 ;;
esac
fi


ext_output=$PHP_CGI
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_CGI" != "no"; then
    ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "#include <sys/un.h>
"
if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h


fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cross-process locking is required by accept()" >&5
printf %s "checking whether cross-process locking is required by accept()... " >&6; }
if test ${php_cv_have_cross_process_locking+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $host_alias in #(
  *solaris*) :
    php_cv_have_cross_process_locking=yes ;; #(
  *) :
    php_cv_have_cross_process_locking=no ;;
esac ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_cross_process_locking" >&5
printf "%s\n" "$php_cv_have_cross_process_locking" >&6; }
  if test "x$php_cv_have_cross_process_locking" = xyes
then :

printf "%s\n" "#define USE_LOCKING 1" >>confdefs.h

fi

    src=$abs_srcdir/sapi/cgi/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments


    case $host_alias in #(
  *cygwin*) :
    SAPI_CGI_PATH=sapi/cgi/php-cgi.exe ;; #(
  *) :
    SAPI_CGI_PATH=sapi/cgi/php-cgi ;;
esac


  if test "program" = "program"; then
    PHP_BINARIES="$PHP_BINARIES cgi"
  elif test "$PHP_SAPI" != "none"; then
    as_fn_error $? "
+--------------------------------------------------------------------+
|                        *** ATTENTION ***                           |
|                                                                    |
| You've configured multiple SAPIs to be built. You can build only   |
| one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
+--------------------------------------------------------------------+
" "$LINENO" 5
  else
    PHP_SAPI=cgi
  fi

  as_fn_append BUILD_DIR " sapi/cgi"


  PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS cgi"



  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  php_c_post=
  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  php_cxx_post=
  php_lo=lo

  case $with_pic in
    yes) pic_setting='-prefer-pic';;
    no)  pic_setting='-prefer-non-pic';;
  esac

  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
  shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  shared_c_post=
  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
  shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  shared_cxx_post=
  shared_lo=lo

    install_binaries="install-binaries"
    install_binary_targets="$install_binary_targets install-cgi"

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_CGI_OBJS"


  case sapi/cgi in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "sapi/cgi"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/sapi/cgi/"; ac_bdir="sapi/cgi/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in cgi_main.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_CGI_OBJS="$PHP_CGI_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done




  case $host_alias in #(
  *aix*) :

      if test "x$php_sapi_module" = xshared
then :

        BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"

else case e in #(
  e)
        BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
       ;;
esac
fi
     ;; #(
  *darwin*) :

      BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
     ;; #(
  *) :

      BUILD_CGI="\$(LIBTOOL) --tag=CC --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
     ;;
esac


  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_CGI_PATH"


  PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_CGI"


  ac_config_files="$ac_config_files sapi/cgi/php-cgi.1"

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chosen SAPI module" >&5
printf %s "checking for chosen SAPI module... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PHP_SAPI" >&5
printf "%s\n" "$PHP_SAPI" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for executable SAPI binaries" >&5
printf %s "checking for executable SAPI binaries... " >&6; }
if ${PHP_BINARIES:+false} :
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PHP_BINARIES" >&5
printf "%s\n" "$PHP_BINARIES" >&6; } ;;
esac
fi

if ${PHP_INSTALLED_SAPIS:+false} :
then :
  as_fn_error $? "Nothing to build." "$LINENO" 5
fi

if test "x$enable_zts" = xyes
then :

  if test -n "$ac_cv_pthreads_lib"; then
    LIBS="$LIBS -l$ac_cv_pthreads_lib"
  fi
  if test -n "$ac_cv_pthreads_cflags"; then
    CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
  fi


  case $host_alias in
  *solaris*)
    PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";;
  *freebsd*)
    PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";;
  *linux*)
    PTHREAD_FLAGS=-D_REENTRANT;;
  *aix*)
    PTHREAD_FLAGS=-D_THREAD_SAFE;;
  *hpux*)
    PTHREAD_FLAGS=-D_REENTRANT;;
  *sco*)
    PTHREAD_FLAGS=-D_REENTRANT;;
  esac

  if test -n "$PTHREAD_FLAGS"; then
    CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS"
  fi


fi



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${T_MD}Running system checks${T_ME}" >&5
printf "%s\n" "${T_MD}Running system checks${T_ME}" >&6; }


PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
# Extract the first word of "sendmail", so it can be a program name with args.
set dummy sendmail; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PROG_SENDMAIL+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $PROG_SENDMAIL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PROG_SENDMAIL="$PROG_SENDMAIL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PATH:$PHP_ALT_PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_PROG_SENDMAIL="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac ;;
esac
fi
PROG_SENDMAIL=$ac_cv_path_PROG_SENDMAIL
if test -n "$PROG_SENDMAIL"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROG_SENDMAIL" >&5
printf "%s\n" "$PROG_SENDMAIL" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


if ${PROG_SENDMAIL:+false} :
then :
  PROG_SENDMAIL=/usr/sbin/sendmail
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: default sendmail_path INI directive set to $PROG_SENDMAIL" >&5
printf "%s\n" "$as_me: default sendmail_path INI directive set to $PROG_SENDMAIL" >&6;}
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system uses EBCDIC" >&5
printf %s "checking whether system uses EBCDIC... " >&6; }
if test ${ac_cv_ebcdic+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_ebcdic=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int main(void) {
  return (unsigned char)'A' != (unsigned char)0xC1;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_ebcdic=yes
else case e in #(
  e) ac_cv_ebcdic=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ebcdic" >&5
printf "%s\n" "$ac_cv_ebcdic" >&6; }
if test "x$ac_cv_ebcdic" = xyes
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "PHP does not support EBCDIC targets.
See 'config.log' for more details" "$LINENO" 5; }
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
printf %s "checking whether byte ordering is bigendian... " >&6; }
if test ${ac_cv_c_bigendian_php+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_c_bigendian_php=unknown
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int main(void)
{
  short one = 1;
  char *cp = (char *)&one;

  if (*cp == 0) {
    return 0;
  }

  return 1;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_c_bigendian_php=yes
else case e in #(
  e) ac_cv_c_bigendian_php=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian_php" >&5
printf "%s\n" "$ac_cv_c_bigendian_php" >&6; }
if test "x$ac_cv_c_bigendian_php" = xyes
then :

printf "%s\n" "#define WORDS_BIGENDIAN /**/" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether writing to stdout works" >&5
printf %s "checking whether writing to stdout works... " >&6; }
if test ${php_cv_have_write_stdout+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  case $host_alias in #(
  *linux*|*midipix) :
    php_cv_have_write_stdout=yes ;; #(
  *) :
    php_cv_have_write_stdout=no ;;
esac
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#define TEXT "This is the test message -- "

int main(void)
{
  int n;

  n = write(1, TEXT, sizeof(TEXT)-1);
  return (!(n == sizeof(TEXT)-1));
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_have_write_stdout=yes
else case e in #(
  e) php_cv_have_write_stdout=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_write_stdout" >&5
printf "%s\n" "$php_cv_have_write_stdout" >&6; }
if test "x$php_cv_have_write_stdout" = xyes
then :

printf "%s\n" "#define PHP_WRITE_STDOUT 1" >>confdefs.h

fi


if test -d /usr/pkg/include && test -d /usr/pkg/lib; then
   CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
   LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
test -d /usr/ucblib &&
  if test "/usr/ucblib" != "/usr/$PHP_LIBDIR" && test "/usr/ucblib" != "/usr/lib"; then

  if test -z "/usr/ucblib" || echo "/usr/ucblib" | grep '^/' >/dev/null ; then
    ai_p=/usr/ucblib
  else

    ep_dir=$(echo /usr/ucblib|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "/usr/ucblib")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
printf %s "checking for library containing socket... " >&6; }
if test ${ac_cv_search_socket+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char socket (void);
int
main (void)
{
return socket ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' socket network
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_socket=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_socket+y}
then :
  break
fi
done
if test ${ac_cv_search_socket+y}
then :

else case e in #(
  e) ac_cv_search_socket=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
printf "%s\n" "$ac_cv_search_socket" >&6; }
ac_res=$ac_cv_search_socket
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi



  for ac_func in socketpair
do :
  ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
if test "x$ac_cv_func_socketpair" = xyes
then :
  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
printf %s "checking for library containing socketpair... " >&6; }
if test ${ac_cv_search_socketpair+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char socketpair (void);
int
main (void)
{
return socketpair ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' socket network
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_socketpair=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_socketpair+y}
then :
  break
fi
done
if test ${ac_cv_search_socketpair+y}
then :

else case e in #(
  e) ac_cv_search_socketpair=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
printf "%s\n" "$ac_cv_search_socketpair" >&6; }
ac_res=$ac_cv_search_socketpair
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h

fi
 ;;
esac
fi

done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyaddr" >&5
printf %s "checking for library containing gethostbyaddr... " >&6; }
if test ${ac_cv_search_gethostbyaddr+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyaddr (void);
int
main (void)
{
return gethostbyaddr ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' nsl network
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_gethostbyaddr=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_gethostbyaddr+y}
then :
  break
fi
done
if test ${ac_cv_search_gethostbyaddr+y}
then :

else case e in #(
  e) ac_cv_search_gethostbyaddr=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyaddr" >&5
printf "%s\n" "$ac_cv_search_gethostbyaddr" >&6; }
ac_res=$ac_cv_search_gethostbyaddr
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
printf %s "checking for library containing dlopen... " >&6; }
if test ${ac_cv_search_dlopen+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dlopen (void);
int
main (void)
{
return dlopen ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' dl
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_dlopen=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_dlopen+y}
then :
  break
fi
done
if test ${ac_cv_search_dlopen+y}
then :

else case e in #(
  e) ac_cv_search_dlopen=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
printf "%s\n" "$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sin" >&5
printf %s "checking for library containing sin... " >&6; }
if test ${ac_cv_search_sin+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char sin (void);
int
main (void)
{
return sin ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' m
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_sin=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_sin+y}
then :
  break
fi
done
if test ${ac_cv_search_sin+y}
then :

else case e in #(
  e) ac_cv_search_sin=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sin" >&5
printf "%s\n" "$ac_cv_search_sin" >&6; }
ac_res=$ac_cv_search_sin
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi


case $host_alias in
  riscv64*)

  unset ac_cv_func___atomic_exchange_1
  unset ac_cv_func_____atomic_exchange_1
  unset found

  ac_fn_c_check_func "$LINENO" "__atomic_exchange_1" "ac_cv_func___atomic_exchange_1"
if test "x$ac_cv_func___atomic_exchange_1" = xyes
then :
  found=yes
else case e in #(
  e)  ac_fn_c_check_func "$LINENO" "____atomic_exchange_1" "ac_cv_func_____atomic_exchange_1"
if test "x$ac_cv_func_____atomic_exchange_1" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
  ;;
esac
fi


  case $found in
  yes)

printf "%s\n" "#define HAVE___ATOMIC_EXCHANGE_1 1" >>confdefs.h

    ac_cv_func___atomic_exchange_1=yes
  ;;

    *)

  unset ac_cv_lib_atomic___atomic_exchange_1
  unset ac_cv_lib_atomic_____atomic_exchange_1
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __atomic_exchange_1 in -latomic" >&5
printf %s "checking for __atomic_exchange_1 in -latomic... " >&6; }
if test ${ac_cv_lib_atomic___atomic_exchange_1+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-latomic  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __atomic_exchange_1 (void);
int
main (void)
{
return __atomic_exchange_1 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_atomic___atomic_exchange_1=yes
else case e in #(
  e) ac_cv_lib_atomic___atomic_exchange_1=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atomic___atomic_exchange_1" >&5
printf "%s\n" "$ac_cv_lib_atomic___atomic_exchange_1" >&6; }
if test "x$ac_cv_lib_atomic___atomic_exchange_1" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ____atomic_exchange_1 in -latomic" >&5
printf %s "checking for ____atomic_exchange_1 in -latomic... " >&6; }
if test ${ac_cv_lib_atomic_____atomic_exchange_1+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-latomic  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char ____atomic_exchange_1 (void);
int
main (void)
{
return ____atomic_exchange_1 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_atomic_____atomic_exchange_1=yes
else case e in #(
  e) ac_cv_lib_atomic_____atomic_exchange_1=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atomic_____atomic_exchange_1" >&5
printf "%s\n" "$ac_cv_lib_atomic_____atomic_exchange_1" >&6; }
if test "x$ac_cv_lib_atomic_____atomic_exchange_1" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -latomic"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case atomic in
  c|c_r) ;;
  *)
      LIBS="-latomic $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE___ATOMIC_EXCHANGE_1 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBATOMIC 1" >>confdefs.h

    ac_cv_func___atomic_exchange_1=yes
  else

  :

  fi

 ;;

  esac

    ;;
esac

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing Pgrab" >&5
printf %s "checking for library containing Pgrab... " >&6; }
if test ${ac_cv_search_Pgrab+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char Pgrab (void);
int
main (void)
{
return Pgrab ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' proc
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_Pgrab=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_Pgrab+y}
then :
  break
fi
done
if test ${ac_cv_search_Pgrab+y}
then :

else case e in #(
  e) ac_cv_search_Pgrab=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Pgrab" >&5
printf "%s\n" "$ac_cv_search_Pgrab" >&6; }
ac_res=$ac_cv_search_Pgrab
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
printf %s "checking for library containing setsockopt... " >&6; }
if test ${ac_cv_search_setsockopt+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char setsockopt (void);
int
main (void)
{
return setsockopt ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' network
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_setsockopt=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_setsockopt+y}
then :
  break
fi
done
if test ${ac_cv_search_setsockopt+y}
then :

else case e in #(
  e) ac_cv_search_setsockopt=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
printf "%s\n" "$ac_cv_search_setsockopt" >&6; }
ac_res=$ac_cv_search_setsockopt
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi



  for ac_func in openpty
do :
  ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
if test "x$ac_cv_func_openpty" = xyes
then :
  printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
printf %s "checking for library containing openpty... " >&6; }
if test ${ac_cv_search_openpty+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char openpty (void);
int
main (void)
{
return openpty ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' util bsd
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_openpty=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_openpty+y}
then :
  break
fi
done
if test ${ac_cv_search_openpty+y}
then :

else case e in #(
  e) ac_cv_search_openpty=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
printf "%s\n" "$ac_cv_search_openpty" >&6; }
ac_res=$ac_cv_search_openpty
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h

fi
 ;;
esac
fi

done


ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_dirent_h" = xyes
then :
  printf "%s\n" "#define HAVE_DIRENT_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_param_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_types_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_time_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_netinet_in_h" = xyes
then :
  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_alloca_h" = xyes
then :
  printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_arpa_inet_h" = xyes
then :
  printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_arpa_nameser_h" = xyes
then :
  printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "dns.h" "ac_cv_header_dns_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_dns_h" = xyes
then :
  printf "%s\n" "#define HAVE_DNS_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_fcntl_h" = xyes
then :
  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_grp_h" = xyes
then :
  printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_ieeefp_h" = xyes
then :
  printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_langinfo_h" = xyes
then :
  printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "linux/sock_diag.h" "ac_cv_header_linux_sock_diag_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_linux_sock_diag_h" = xyes
then :
  printf "%s\n" "#define HAVE_LINUX_SOCK_DIAG_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_poll_h" = xyes
then :
  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_pty_h" = xyes
then :
  printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_pwd_h" = xyes
then :
  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_resolv_h" = xyes
then :
  printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_strings_h" = xyes
then :
  printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_syslog_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sysexits_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_ioctl_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_file_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_mman_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_mount_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_poll_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_resource_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_select_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_socket_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_stat_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_statfs_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_statvfs_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/vfs.h" "ac_cv_header_sys_vfs_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_vfs_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_VFS_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/sysexits.h" "ac_cv_header_sys_sysexits_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_sysexits_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_SYSEXITS_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_uio_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_wait_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_loadavg_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_LOADAVG_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_unistd_h" = xyes
then :
  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "unix.h" "ac_cv_header_unix_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_unix_h" = xyes
then :
  printf "%s\n" "#define HAVE_UNIX_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_utime_h" = xyes
then :
  printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_utsname_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_sys_ipc_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_dlfcn_h" = xyes
then :
  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "tmmintrin.h" "ac_cv_header_tmmintrin_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_tmmintrin_h" = xyes
then :
  printf "%s\n" "#define HAVE_TMMINTRIN_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "nmmintrin.h" "ac_cv_header_nmmintrin_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_nmmintrin_h" = xyes
then :
  printf "%s\n" "#define HAVE_NMMINTRIN_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "wmmintrin.h" "ac_cv_header_wmmintrin_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_wmmintrin_h" = xyes
then :
  printf "%s\n" "#define HAVE_WMMINTRIN_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_immintrin_h" = xyes
then :
  printf "%s\n" "#define HAVE_IMMINTRIN_H 1" >>confdefs.h

fi


ac_fn_c_check_type "$LINENO" "cookie_io_functions_t" "ac_cv_type_cookie_io_functions_t" "#include <stdio.h>
"
if test "x$ac_cv_type_cookie_io_functions_t" = xyes
then :
  ac_fn_c_check_func "$LINENO" "fopencookie" "ac_cv_func_fopencookie"
if test "x$ac_cv_func_fopencookie" = xyes
then :
  printf "%s\n" "#define HAVE_FOPENCOOKIE 1" >>confdefs.h

fi

fi

if test "x$ac_cv_func_fopencookie" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopencookie seeker uses off64_t" >&5
printf %s "checking whether fopencookie seeker uses off64_t... " >&6; }
if test ${php_cv_type_cookie_off64_t+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  case $host_alias in #(
  *linux*) :
    php_cv_type_cookie_off64_t=yes ;; #(
  *) :
    php_cv_type_cookie_off64_t=no ;;
esac

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <stdlib.h>

struct cookiedata {
  off64_t pos;
};

ssize_t reader(void *cookie, char *buffer, size_t size)
{ (void)cookie; (void)buffer; return size; }
ssize_t writer(void *cookie, const char *buffer, size_t size)
{ (void)cookie; (void)buffer; return size; }
int closer(void *cookie)
{ (void)cookie; return 0; }
int seeker(void *cookie, off64_t *position, int whence)
{ ((struct cookiedata*)cookie)->pos = *position; (void)whence; return 0; }

cookie_io_functions_t funcs = {reader, writer, seeker, closer};

int main(void) {
  struct cookiedata g = { 0 };
  FILE *fp = fopencookie(&g, "r", funcs);
  if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192) {
    return 0;
  }
  return 1;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_type_cookie_off64_t=yes
else case e in #(
  e) php_cv_type_cookie_off64_t=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_type_cookie_off64_t" >&5
printf "%s\n" "$php_cv_type_cookie_off64_t" >&6; }
  if test "x$php_cv_type_cookie_off64_t" = xyes
then :

printf "%s\n" "#define COOKIE_SEEKER_USES_OFF64_T 1" >>confdefs.h

fi

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken getcwd" >&5
printf %s "checking for broken getcwd... " >&6; }
if test ${php_cv_func_getcwd_broken+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $host_alias in #(
  *solaris*) :
    php_cv_func_getcwd_broken=yes ;; #(
  *) :
    php_cv_func_getcwd_broken=no ;;
esac ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_getcwd_broken" >&5
printf "%s\n" "$php_cv_func_getcwd_broken" >&6; }
if test "x$php_cv_func_getcwd_broken" = xyes
then :

printf "%s\n" "#define HAVE_BROKEN_GETCWD 1" >>confdefs.h

fi

if test "x$GCC" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken gcc optimize-strlen" >&5
printf %s "checking for broken gcc optimize-strlen... " >&6; }
if test ${php_cv_have_broken_gcc_strlen_opt+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_have_broken_gcc_strlen_opt=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
struct s
{
  int i;
  char c[1];
};
int main(void)
{
  struct s *s = malloc(sizeof(struct s) + 3);
  s->i = 3;
  strcpy(s->c, "foo");
  return strlen(s->c+1) == 2;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_have_broken_gcc_strlen_opt=yes
else case e in #(
  e) php_cv_have_broken_gcc_strlen_opt=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_broken_gcc_strlen_opt" >&5
printf "%s\n" "$php_cv_have_broken_gcc_strlen_opt" >&6; }
if test "x$php_cv_have_broken_gcc_strlen_opt" = xyes
then :
  as_fn_append CFLAGS " -fno-optimize-strlen"
fi

fi



ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_mkdev_h" = xyes
then :

printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h

fi

if test $ac_cv_header_sys_mkdev_h = no; then
  ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_sysmacros_h" = xyes
then :

printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h

fi

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
if test ${ac_cv_struct_tm+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <time.h>

int
main (void)
{
struct tm tm;
				     int *p = &tm.tm_sec;
				     return !p;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_struct_tm=time.h
else case e in #(
  e) ac_cv_struct_tm=sys/time.h ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
printf "%s\n" "$ac_cv_struct_tm" >&6; }
if test $ac_cv_struct_tm = sys/time.h; then

printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h

fi

ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
#include <$ac_cv_struct_tm>

"
if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h


fi

if test "$ac_cv_member_struct_tm_tm_zone" = yes; then

printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h

else
  ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_tzname" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
printf %s "checking for tzname... " >&6; }
if test ${ac_cv_var_tzname+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <time.h>
#if !HAVE_DECL_TZNAME
extern char *tzname[];
#endif

int
main (void)
{
return tzname[0][0];
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_var_tzname=yes
else case e in #(
  e) ac_cv_var_tzname=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
printf "%s\n" "$ac_cv_var_tzname" >&6; }
  if test $ac_cv_var_tzname = yes; then

printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h

  fi
fi



ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_localtime_r" = xyes
then :

else case e in #(
  e)
printf "%s\n" "#define MISSING_LOCALTIME_R_DECL 1" >>confdefs.h
 ;;
esac
fi
ac_fn_check_decl "$LINENO" "gmtime_r" "ac_cv_have_decl_gmtime_r" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_gmtime_r" = xyes
then :

else case e in #(
  e)
printf "%s\n" "#define MISSING_GMTIME_R_DECL 1" >>confdefs.h
 ;;
esac
fi
ac_fn_check_decl "$LINENO" "asctime_r" "ac_cv_have_decl_asctime_r" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_asctime_r" = xyes
then :

else case e in #(
  e)
printf "%s\n" "#define MISSING_ASCTIME_R_DECL 1" >>confdefs.h
 ;;
esac
fi
ac_fn_check_decl "$LINENO" "ctime_r" "ac_cv_have_decl_ctime_r" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_ctime_r" = xyes
then :

else case e in #(
  e)
printf "%s\n" "#define MISSING_CTIME_R_DECL 1" >>confdefs.h
 ;;
esac
fi
ac_fn_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "#include <string.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strtok_r" = xyes
then :

else case e in #(
  e)
printf "%s\n" "#define MISSING_STRTOK_R_DECL 1" >>confdefs.h
 ;;
esac
fi


ac_fn_c_check_type "$LINENO" "struct flock" "ac_cv_type_struct_flock" "#include <fcntl.h>
"
if test "x$ac_cv_type_struct_flock" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_FLOCK 1" >>confdefs.h


fi

ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
  #ifdef HAVE_SYS_TYPES_H
  # include <sys/types.h>
  #endif
  #ifdef HAVE_SYS_SOCKET_H
  # include <sys/socket.h>
  #endif

"
if test "x$ac_cv_type_socklen_t" = xyes
then :

printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h


fi



  # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
printf %s "checking size of int... " >&6; }
if test ${ac_cv_sizeof_int+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_int" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_int=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
printf "%s\n" "$ac_cv_sizeof_int" >&6; }



printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h


  # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
printf %s "checking size of long... " >&6; }
if test ${ac_cv_sizeof_long+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_long" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
printf "%s\n" "$ac_cv_sizeof_long" >&6; }



printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h


  # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
printf %s "checking size of long long... " >&6; }
if test ${ac_cv_sizeof_long_long+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_long_long" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long long)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long_long=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }



printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h


  # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
printf %s "checking size of size_t... " >&6; }
if test ${ac_cv_sizeof_size_t+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_size_t" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (size_t)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_size_t=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }



printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h


  # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
printf %s "checking size of off_t... " >&6; }
if test ${ac_cv_sizeof_off_t+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_off_t" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (off_t)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_off_t=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }



printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h





{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
printf %s "checking for __builtin_clz... " >&6; }
if test ${php_cv_have___builtin_clz+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { return __builtin_clz(1) ? 1 : 0; return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_clz=yes
else case e in #(
  e) php_cv_have___builtin_clz=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_clz" >&5
printf "%s\n" "$php_cv_have___builtin_clz" >&6; }
if test "x$php_cv_have___builtin_clz" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_CLZ 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_clzl" >&5
printf %s "checking for __builtin_clzl... " >&6; }
if test ${php_cv_have___builtin_clzl+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { return __builtin_clzl(1) ? 1 : 0; return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_clzl=yes
else case e in #(
  e) php_cv_have___builtin_clzl=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_clzl" >&5
printf "%s\n" "$php_cv_have___builtin_clzl" >&6; }
if test "x$php_cv_have___builtin_clzl" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_CLZL 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_clzll" >&5
printf %s "checking for __builtin_clzll... " >&6; }
if test ${php_cv_have___builtin_clzll+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { return __builtin_clzll(1) ? 1 : 0; return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_clzll=yes
else case e in #(
  e) php_cv_have___builtin_clzll=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_clzll" >&5
printf "%s\n" "$php_cv_have___builtin_clzll" >&6; }
if test "x$php_cv_have___builtin_clzll" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_CLZLL 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_cpu_init" >&5
printf %s "checking for __builtin_cpu_init... " >&6; }
if test ${php_cv_have___builtin_cpu_init+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { __builtin_cpu_init(); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_cpu_init=yes
else case e in #(
  e) php_cv_have___builtin_cpu_init=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_cpu_init" >&5
printf "%s\n" "$php_cv_have___builtin_cpu_init" >&6; }
if test "x$php_cv_have___builtin_cpu_init" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_CPU_INIT 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_cpu_supports" >&5
printf %s "checking for __builtin_cpu_supports... " >&6; }
if test ${php_cv_have___builtin_cpu_supports+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { return __builtin_cpu_supports("sse")? 1 : 0; return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_cpu_supports=yes
else case e in #(
  e) php_cv_have___builtin_cpu_supports=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_cpu_supports" >&5
printf "%s\n" "$php_cv_have___builtin_cpu_supports" >&6; }
if test "x$php_cv_have___builtin_cpu_supports" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_CPU_SUPPORTS 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctzl" >&5
printf %s "checking for __builtin_ctzl... " >&6; }
if test ${php_cv_have___builtin_ctzl+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { return __builtin_ctzl(2L) ? 1 : 0; return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_ctzl=yes
else case e in #(
  e) php_cv_have___builtin_ctzl=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_ctzl" >&5
printf "%s\n" "$php_cv_have___builtin_ctzl" >&6; }
if test "x$php_cv_have___builtin_ctzl" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_CTZL 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctzll" >&5
printf %s "checking for __builtin_ctzll... " >&6; }
if test ${php_cv_have___builtin_ctzll+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { return __builtin_ctzll(2LL) ? 1 : 0; return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_ctzll=yes
else case e in #(
  e) php_cv_have___builtin_ctzll=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_ctzll" >&5
printf "%s\n" "$php_cv_have___builtin_ctzll" >&6; }
if test "x$php_cv_have___builtin_ctzll" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_CTZLL 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
printf %s "checking for __builtin_expect... " >&6; }
if test ${php_cv_have___builtin_expect+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { return __builtin_expect(1,1) ? 1 : 0; return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_expect=yes
else case e in #(
  e) php_cv_have___builtin_expect=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_expect" >&5
printf "%s\n" "$php_cv_have___builtin_expect" >&6; }
if test "x$php_cv_have___builtin_expect" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_EXPECT 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
printf %s "checking for __builtin_frame_address... " >&6; }
if test ${php_cv_have___builtin_frame_address+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { return __builtin_frame_address(0) != (void*)0; return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_frame_address=yes
else case e in #(
  e) php_cv_have___builtin_frame_address=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_frame_address" >&5
printf "%s\n" "$php_cv_have___builtin_frame_address" >&6; }
if test "x$php_cv_have___builtin_frame_address" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_FRAME_ADDRESS 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_saddl_overflow" >&5
printf %s "checking for __builtin_saddl_overflow... " >&6; }
if test ${php_cv_have___builtin_saddl_overflow+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { long tmpvar; return __builtin_saddl_overflow(3, 7, &tmpvar); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_saddl_overflow=yes
else case e in #(
  e) php_cv_have___builtin_saddl_overflow=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_saddl_overflow" >&5
printf "%s\n" "$php_cv_have___builtin_saddl_overflow" >&6; }
if test "x$php_cv_have___builtin_saddl_overflow" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_SADDL_OVERFLOW 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_saddll_overflow" >&5
printf %s "checking for __builtin_saddll_overflow... " >&6; }
if test ${php_cv_have___builtin_saddll_overflow+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { long long tmpvar; return __builtin_saddll_overflow(3, 7, &tmpvar); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_saddll_overflow=yes
else case e in #(
  e) php_cv_have___builtin_saddll_overflow=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_saddll_overflow" >&5
printf "%s\n" "$php_cv_have___builtin_saddll_overflow" >&6; }
if test "x$php_cv_have___builtin_saddll_overflow" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_SADDLL_OVERFLOW 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_smull_overflow" >&5
printf %s "checking for __builtin_smull_overflow... " >&6; }
if test ${php_cv_have___builtin_smull_overflow+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { long tmpvar; return __builtin_smull_overflow(3, 7, &tmpvar); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_smull_overflow=yes
else case e in #(
  e) php_cv_have___builtin_smull_overflow=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_smull_overflow" >&5
printf "%s\n" "$php_cv_have___builtin_smull_overflow" >&6; }
if test "x$php_cv_have___builtin_smull_overflow" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_SMULL_OVERFLOW 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_smulll_overflow" >&5
printf %s "checking for __builtin_smulll_overflow... " >&6; }
if test ${php_cv_have___builtin_smulll_overflow+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { long long tmpvar; return __builtin_smulll_overflow(3, 7, &tmpvar); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_smulll_overflow=yes
else case e in #(
  e) php_cv_have___builtin_smulll_overflow=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_smulll_overflow" >&5
printf "%s\n" "$php_cv_have___builtin_smulll_overflow" >&6; }
if test "x$php_cv_have___builtin_smulll_overflow" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_SMULLL_OVERFLOW 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_ssubl_overflow" >&5
printf %s "checking for __builtin_ssubl_overflow... " >&6; }
if test ${php_cv_have___builtin_ssubl_overflow+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { long tmpvar; return __builtin_ssubl_overflow(3, 7, &tmpvar); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_ssubl_overflow=yes
else case e in #(
  e) php_cv_have___builtin_ssubl_overflow=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_ssubl_overflow" >&5
printf "%s\n" "$php_cv_have___builtin_ssubl_overflow" >&6; }
if test "x$php_cv_have___builtin_ssubl_overflow" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_SSUBL_OVERFLOW 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_ssubll_overflow" >&5
printf %s "checking for __builtin_ssubll_overflow... " >&6; }
if test ${php_cv_have___builtin_ssubll_overflow+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { long long tmpvar; return __builtin_ssubll_overflow(3, 7, &tmpvar); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_ssubll_overflow=yes
else case e in #(
  e) php_cv_have___builtin_ssubll_overflow=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_ssubll_overflow" >&5
printf "%s\n" "$php_cv_have___builtin_ssubll_overflow" >&6; }
if test "x$php_cv_have___builtin_ssubll_overflow" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_SSUBLL_OVERFLOW 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
printf %s "checking for __builtin_unreachable... " >&6; }
if test ${php_cv_have___builtin_unreachable+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { __builtin_unreachable(); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_unreachable=yes
else case e in #(
  e) php_cv_have___builtin_unreachable=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_unreachable" >&5
printf "%s\n" "$php_cv_have___builtin_unreachable" >&6; }
if test "x$php_cv_have___builtin_unreachable" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_UNREACHABLE 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_usub_overflow" >&5
printf %s "checking for __builtin_usub_overflow... " >&6; }
if test ${php_cv_have___builtin_usub_overflow+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main(void) { unsigned int tmpvar; return __builtin_usub_overflow(3, 7, &tmpvar); return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___builtin_usub_overflow=yes
else case e in #(
  e) php_cv_have___builtin_usub_overflow=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___builtin_usub_overflow" >&5
printf "%s\n" "$php_cv_have___builtin_usub_overflow" >&6; }
if test "x$php_cv_have___builtin_usub_overflow" = xyes
then :

printf "%s\n" "#define PHP_HAVE_BUILTIN_USUB_OVERFLOW 1" >>confdefs.h

fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports AVX-512" >&5
printf %s "checking whether compiler supports AVX-512... " >&6; }
if test ${php_cv_have_avx512+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) save_CFLAGS="$CFLAGS"
CFLAGS="-mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw $CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <immintrin.h>
  int main(void) {
    __m512i mask = _mm512_set1_epi32(0x1);
    char out[32];
    _mm512_storeu_si512(out, _mm512_shuffle_epi8(mask, mask));
    return 0;
  }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have_avx512=yes
else case e in #(
  e) php_cv_have_avx512=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_avx512" >&5
printf "%s\n" "$php_cv_have_avx512" >&6; }
if test "x$php_cv_have_avx512" = xyes
then :

printf "%s\n" "#define PHP_HAVE_AVX512_SUPPORTS 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports AVX-512 VBMI" >&5
printf %s "checking whether compiler supports AVX-512 VBMI... " >&6; }
if test ${php_cv_have_avx512vbmi+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) save_CFLAGS="$CFLAGS"
CFLAGS="-mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw -mavx512vbmi $CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <immintrin.h>
  int main(void) {
    __m512i mask = _mm512_set1_epi32(0x1);
    char out[32];
    _mm512_storeu_si512(out, _mm512_permutexvar_epi8(mask, mask));
    return 0;
  }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have_avx512vbmi=yes
else case e in #(
  e) php_cv_have_avx512vbmi=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_avx512vbmi" >&5
printf "%s\n" "$php_cv_have_avx512vbmi" >&6; }
if test "x$php_cv_have_avx512vbmi" = xyes
then :

printf "%s\n" "#define PHP_HAVE_AVX512_VBMI_SUPPORTS 1" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports __alignof__" >&5
printf %s "checking whether the compiler supports __alignof__... " >&6; }
if test ${php_cv_have_alignof+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  int align = __alignof__(int);
  (void)align;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_alignof=yes
else case e in #(
  e) php_cv_have_alignof=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_alignof" >&5
printf "%s\n" "$php_cv_have_alignof" >&6; }
if test "x$php_cv_have_alignof" = xyes
then :

printf "%s\n" "#define HAVE_ALIGNOF 1" >>confdefs.h

fi

ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
"
if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_TM_TM_GMTOFF 1" >>confdefs.h


fi

ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h


fi

if test "$(uname -s 2>/dev/null)" != "QNX"; then
  ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
if test "x$ac_cv_member_struct_stat_st_blocks" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h


printf "%s\n" "#define HAVE_ST_BLOCKS 1" >>confdefs.h

else case e in #(
  e) case " $LIBOBJS " in
  *" fileblocks.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
 ;;
esac
 ;;
esac
fi


fi

ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
if test "x$ac_cv_type_uid_t" = xyes
then :

else case e in #(
  e)
printf "%s\n" "#define uid_t int" >>confdefs.h
 ;;
esac
fi

ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
if test "x$ac_cv_type_gid_t" = xyes
then :

else case e in #(
  e)
printf "%s\n" "#define gid_t int" >>confdefs.h
 ;;
esac
fi


ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/socket.h>
"
if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h


fi

ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
"
if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_SA_LEN 1" >>confdefs.h


fi


case $host_alias in #(
  *-*-*android*|*-*-*uclibc*|*-*-*musl*|*openbsd*) :
    true ;; #(
  *) :

  if test "$(uname -s 2>/dev/null)" != "FreeBSD" || test "$(uname -U 2>/dev/null)" -ge 1200000; then



    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((ifunc))" >&5
printf %s "checking for __attribute__((ifunc))... " >&6; }
if test ${ax_cv_have_func_attribute_ifunc+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


                    int my_foo( void ) { return 0; }
                    static int (*resolve_foo(void))(void) { return my_foo; }
                    int foo( void ) __attribute__((ifunc("resolve_foo")));

int
main (void)
{

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
                                      if test -s conftest.err
then :
  ax_cv_have_func_attribute_ifunc=no
else case e in #(
  e) ax_cv_have_func_attribute_ifunc=yes ;;
esac
fi
else case e in #(
  e) ax_cv_have_func_attribute_ifunc=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
     ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_ifunc" >&5
printf "%s\n" "$ax_cv_have_func_attribute_ifunc" >&6; }

    if test yes = $ax_cv_have_func_attribute_ifunc
then :

printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_IFUNC 1" >>confdefs.h

fi






    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((target))" >&5
printf %s "checking for __attribute__((target))... " >&6; }
if test ${ax_cv_have_func_attribute_target+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


                    int bar( void ) __attribute__((target("sse2")));

int
main (void)
{

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
                                      if test -s conftest.err
then :
  ax_cv_have_func_attribute_target=no
else case e in #(
  e) ax_cv_have_func_attribute_target=yes ;;
esac
fi
else case e in #(
  e) ax_cv_have_func_attribute_target=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
     ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_target" >&5
printf "%s\n" "$ax_cv_have_func_attribute_target" >&6; }

    if test yes = $ax_cv_have_func_attribute_target
then :

printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_TARGET 1" >>confdefs.h

fi



  fi
 ;;
esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable __attribute__((aligned))" >&5
printf %s "checking for variable __attribute__((aligned))... " >&6; }
if test ${php_cv_have_variable_attribute_aligned+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
unsigned char test32 __attribute__((aligned(__alignof__(int))));
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
    if test -s conftest.err
then :
  php_cv_have_variable_attribute_aligned=no
else case e in #(
  e) php_cv_have_variable_attribute_aligned=yes ;;
esac
fi
else case e in #(
  e) php_cv_have_variable_attribute_aligned=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_variable_attribute_aligned" >&5
printf "%s\n" "$php_cv_have_variable_attribute_aligned" >&6; }
if test "x$php_cv_have_variable_attribute_aligned" = xyes
then :

printf "%s\n" "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h

fi




ac_fn_c_check_func "$LINENO" "alphasort" "ac_cv_func_alphasort"
if test "x$ac_cv_func_alphasort" = xyes
then :
  printf "%s\n" "#define HAVE_ALPHASORT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "asctime_r" "ac_cv_func_asctime_r"
if test "x$ac_cv_func_asctime_r" = xyes
then :
  printf "%s\n" "#define HAVE_ASCTIME_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf"
if test "x$ac_cv_func_asprintf" = xyes
then :
  printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
if test "x$ac_cv_func_chroot" = xyes
then :
  printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
if test "x$ac_cv_func_ctime_r" = xyes
then :
  printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
if test "x$ac_cv_func_explicit_memset" = xyes
then :
  printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
if test "x$ac_cv_func_fdatasync" = xyes
then :
  printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
if test "x$ac_cv_func_flock" = xyes
then :
  printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ftok" "ac_cv_func_ftok"
if test "x$ac_cv_func_ftok" = xyes
then :
  printf "%s\n" "#define HAVE_FTOK 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "funopen" "ac_cv_func_funopen"
if test "x$ac_cv_func_funopen" = xyes
then :
  printf "%s\n" "#define HAVE_FUNOPEN 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
if test "x$ac_cv_func_gai_strerror" = xyes
then :
  printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
if test "x$ac_cv_func_getcwd" = xyes
then :
  printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r"
if test "x$ac_cv_func_getgrnam_r" = xyes
then :
  printf "%s\n" "#define HAVE_GETGRNAM_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
if test "x$ac_cv_func_gethostname" = xyes
then :
  printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
if test "x$ac_cv_func_getloadavg" = xyes
then :
  printf "%s\n" "#define HAVE_GETLOADAVG 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getprotobyname" "ac_cv_func_getprotobyname"
if test "x$ac_cv_func_getprotobyname" = xyes
then :
  printf "%s\n" "#define HAVE_GETPROTOBYNAME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getprotobynumber" "ac_cv_func_getprotobynumber"
if test "x$ac_cv_func_getprotobynumber" = xyes
then :
  printf "%s\n" "#define HAVE_GETPROTOBYNUMBER 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r"
if test "x$ac_cv_func_getpwnam_r" = xyes
then :
  printf "%s\n" "#define HAVE_GETPWNAM_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r"
if test "x$ac_cv_func_getpwuid_r" = xyes
then :
  printf "%s\n" "#define HAVE_GETPWUID_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
if test "x$ac_cv_func_getrusage" = xyes
then :
  printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
if test "x$ac_cv_func_getservbyname" = xyes
then :
  printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getservbyport" "ac_cv_func_getservbyport"
if test "x$ac_cv_func_getservbyport" = xyes
then :
  printf "%s\n" "#define HAVE_GETSERVBYPORT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
if test "x$ac_cv_func_gettimeofday" = xyes
then :
  printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
if test "x$ac_cv_func_getwd" = xyes
then :
  printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
if test "x$ac_cv_func_glob" = xyes
then :
  printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
if test "x$ac_cv_func_gmtime_r" = xyes
then :
  printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
if test "x$ac_cv_func_issetugid" = xyes
then :
  printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
if test "x$ac_cv_func_lchown" = xyes
then :
  printf "%s\n" "#define HAVE_LCHOWN 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
if test "x$ac_cv_func_localtime_r" = xyes
then :
  printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "memcntl" "ac_cv_func_memcntl"
if test "x$ac_cv_func_memcntl" = xyes
then :
  printf "%s\n" "#define HAVE_MEMCNTL 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create"
if test "x$ac_cv_func_memfd_create" = xyes
then :
  printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
if test "x$ac_cv_func_memmem" = xyes
then :
  printf "%s\n" "#define HAVE_MEMMEM 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
if test "x$ac_cv_func_mempcpy" = xyes
then :
  printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
if test "x$ac_cv_func_memrchr" = xyes
then :
  printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "memset_explicit" "ac_cv_func_memset_explicit"
if test "x$ac_cv_func_memset_explicit" = xyes
then :
  printf "%s\n" "#define HAVE_MEMSET_EXPLICIT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
if test "x$ac_cv_func_mkstemp" = xyes
then :
  printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
if test "x$ac_cv_func_mmap" = xyes
then :
  printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
if test "x$ac_cv_func_nice" = xyes
then :
  printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
if test "x$ac_cv_func_nl_langinfo" = xyes
then :
  printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
if test "x$ac_cv_func_poll" = xyes
then :
  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_jit_write_protect_np" "ac_cv_func_pthread_jit_write_protect_np"
if test "x$ac_cv_func_pthread_jit_write_protect_np" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_JIT_WRITE_PROTECT_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
if test "x$ac_cv_func_putenv" = xyes
then :
  printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
if test "x$ac_cv_func_reallocarray" = xyes
then :
  printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "scandir" "ac_cv_func_scandir"
if test "x$ac_cv_func_scandir" = xyes
then :
  printf "%s\n" "#define HAVE_SCANDIR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
if test "x$ac_cv_func_setenv" = xyes
then :
  printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
if test "x$ac_cv_func_setitimer" = xyes
then :
  printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
if test "x$ac_cv_func_shutdown" = xyes
then :
  printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
if test "x$ac_cv_func_sigprocmask" = xyes
then :
  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "statfs" "ac_cv_func_statfs"
if test "x$ac_cv_func_statfs" = xyes
then :
  printf "%s\n" "#define HAVE_STATFS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
if test "x$ac_cv_func_statvfs" = xyes
then :
  printf "%s\n" "#define HAVE_STATVFS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "std_syslog" "ac_cv_func_std_syslog"
if test "x$ac_cv_func_std_syslog" = xyes
then :
  printf "%s\n" "#define HAVE_STD_SYSLOG 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
if test "x$ac_cv_func_strcasecmp" = xyes
then :
  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
if test "x$ac_cv_func_strptime" = xyes
then :
  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
if test "x$ac_cv_func_strtok_r" = xyes
then :
  printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "symlink" "ac_cv_func_symlink"
if test "x$ac_cv_func_symlink" = xyes
then :
  printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
if test "x$ac_cv_func_tzset" = xyes
then :
  printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
if test "x$ac_cv_func_unsetenv" = xyes
then :
  printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
if test "x$ac_cv_func_usleep" = xyes
then :
  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
if test "x$ac_cv_func_utime" = xyes
then :
  printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
if test "x$ac_cv_func_vasprintf" = xyes
then :
  printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h

fi



php_enable_system_glob=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use the system glob function" >&5
printf %s "checking whether to use the system glob function... " >&6; }
# Check whether --enable-system-glob was given.
if test ${enable_system_glob+y}
then :
  enableval=$enable_system_glob; PHP_SYSTEM_GLOB=$enableval
else case e in #(
  e)
  PHP_SYSTEM_GLOB=no

 ;;
esac
fi


ext_output=$PHP_SYSTEM_GLOB
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_SYSTEM_GLOB" = xyes
then :

printf "%s\n" "#define PHP_SYSTEM_GLOB 1" >>confdefs.h

fi

ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
if test "x$ac_cv_func_inet_ntop" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required inet_ntop not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
if test "x$ac_cv_func_inet_pton" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required inet_pton not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi


ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strerror_r" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h


if test $ac_cv_have_decl_strerror_r = yes; then
  # For backward compatibility's sake, define HAVE_STRERROR_R.
  # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
  # as AC_CHECK_DECLS_ONCE.)

printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
printf %s "checking whether strerror_r returns char *... " >&6; }
if test ${ac_cv_func_strerror_r_char_p+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    ac_cv_func_strerror_r_char_p=no
    if test $ac_cv_have_decl_strerror_r = yes; then
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string.h>
int
main (void)
{

	  char buf[100];
	  char x = *strerror_r (0, buf, sizeof buf);
	  char *p = strerror_r (0, buf, sizeof buf);
	  return !p || x;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_func_strerror_r_char_p=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

    fi
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
if test $ac_cv_func_strerror_r_char_p = yes; then

printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h

fi


ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_prctl_h" = xyes
then :
  ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
if test "x$ac_cv_func_prctl" = xyes
then :
  printf "%s\n" "#define HAVE_PRCTL 1" >>confdefs.h

fi

fi

ac_fn_c_check_header_compile "$LINENO" "sys/procctl.h" "ac_cv_header_sys_procctl_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_procctl_h" = xyes
then :
  ac_fn_c_check_func "$LINENO" "procctl" "ac_cv_func_procctl"
if test "x$ac_cv_func_procctl" = xyes
then :
  printf "%s\n" "#define HAVE_PROCCTL 1" >>confdefs.h

fi

fi




    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyname_r() takes" >&5
printf %s "checking how many arguments gethostbyname_r() takes... " >&6; }

    if test ${ac_cv_func_which_gethostbyname_r+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)

################################################################

ac_cv_func_which_gethostbyname_r=unknown

#
# ONE ARGUMENT (sanity check)
#

# This should fail, as there is no variant of gethostbyname_r() that takes
# a single argument. If it actually compiles, then we can assume that
# netdb.h is not declaring the function, and the compiler is thereby
# assuming an implicit prototype. In which case, we're out of luck.
#
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <netdb.h>
int
main (void)
{

            char *name = "www.gnu.org";
            (void)gethostbyname_r(name) /* ; */

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_func_which_gethostbyname_r=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

#
# SIX ARGUMENTS
# (e.g. Linux)
#

if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <netdb.h>
int
main (void)
{

            char *name = "www.gnu.org";
            struct hostent ret, *retp;
            char buf[1024];
            int buflen = 1024;
            int my_h_errno;
            (void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_func_which_gethostbyname_r=six
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi

#
# FIVE ARGUMENTS
# (e.g. Solaris)
#

if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <netdb.h>
int
main (void)
{

            char *name = "www.gnu.org";
            struct hostent ret;
            char buf[1024];
            int buflen = 1024;
            int my_h_errno;
            (void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_func_which_gethostbyname_r=five
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi

#
# THREE ARGUMENTS
# (e.g. AIX, HP-UX, Tru64)
#

if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <netdb.h>
int
main (void)
{

            char *name = "www.gnu.org";
            struct hostent ret;
            struct hostent_data data;
            (void)gethostbyname_r(name, &ret, &data) /* ; */

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_func_which_gethostbyname_r=three
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi

################################################################

 ;;
esac
fi

case "$ac_cv_func_which_gethostbyname_r" in
    three|five|six)

printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h

    ;;
esac

case "$ac_cv_func_which_gethostbyname_r" in
    three)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: three" >&5
printf "%s\n" "three" >&6; }

printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_3 1" >>confdefs.h

    ;;

    five)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: five" >&5
printf "%s\n" "five" >&6; }

printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_5 1" >>confdefs.h

    ;;

    six)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: six" >&5
printf "%s\n" "six" >&6; }

printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_6 1" >>confdefs.h

    ;;

    no)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in netdb.h" >&5
printf "%s\n" "cannot find function declaration in netdb.h" >&6; }
    ;;

    unknown)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5
printf "%s\n" "can't tell" >&6; }
    ;;

    *)
    as_fn_error $? "internal error" "$LINENO" 5
    ;;
esac

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu





  for ac_func in nanosleep
do :
  ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
if test "x$ac_cv_func_nanosleep" = xyes
then :
  printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
printf %s "checking for library containing nanosleep... " >&6; }
if test ${ac_cv_search_nanosleep+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char nanosleep (void);
int
main (void)
{
return nanosleep ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_nanosleep=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_nanosleep+y}
then :
  break
fi
done
if test ${ac_cv_search_nanosleep+y}
then :

else case e in #(
  e) ac_cv_search_nanosleep=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
ac_res=$ac_cv_search_nanosleep
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h

fi
 ;;
esac
fi

done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
printf %s "checking for getaddrinfo... " >&6; }
if test ${php_cv_func_getaddrinfo+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <netdb.h>
int
main (void)
{
struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  if test "$cross_compiling" = yes
then :
  case $host_alias in #(
  *linux*|*midipix) :
    php_cv_func_getaddrinfo=yes ;; #(
  *) :
    php_cv_func_getaddrinfo=no ;;
esac
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <netdb.h>
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#ifndef AF_INET
# include <sys/socket.h>
#endif
int main(void) {
  struct addrinfo *ai, *pai, hints;

  memset(&hints, 0, sizeof(hints));
  hints.ai_flags = AI_NUMERICHOST;

  if (getaddrinfo("127.0.0.1", 0, &hints, &ai) < 0) {
    return 1;
  }

  if (ai == 0) {
    return 1;
  }

  pai = ai;

  while (pai) {
    if (pai->ai_family != AF_INET) {
      /* 127.0.0.1/NUMERICHOST should only resolve ONE way */
      return 1;
    }
    if (pai->ai_addr->sa_family != AF_INET) {
      /* 127.0.0.1/NUMERICHOST should only resolve ONE way */
      return 1;
    }
    pai = pai->ai_next;
  }
  freeaddrinfo(ai);
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_getaddrinfo=yes
else case e in #(
  e) php_cv_func_getaddrinfo=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

else case e in #(
  e) php_cv_func_getaddrinfo=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_getaddrinfo" >&5
printf "%s\n" "$php_cv_func_getaddrinfo" >&6; }
if test "x$php_cv_func_getaddrinfo" = xyes
then :

printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for copy_file_range" >&5
printf %s "checking for copy_file_range... " >&6; }
if test ${php_cv_func_copy_file_range+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifndef __linux__
# error "unsupported platform"
#endif
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
# error "kernel too old"
#endif
#include <unistd.h>
int main(void)
{
  (void)copy_file_range(-1, 0, -1, 0, 0, 0);
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_func_copy_file_range=yes
else case e in #(
  e) php_cv_func_copy_file_range=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_copy_file_range" >&5
printf "%s\n" "$php_cv_func_copy_file_range" >&6; }
if test "x$php_cv_func_copy_file_range" = xyes
then :

printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h

fi

ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
if test "x$ac_cv_func_strlcat" = xyes
then :
  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h

else case e in #(
  e) case " $LIBOBJS " in
  *" strlcat.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
 ;;
esac
 ;;
esac
fi
ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
if test "x$ac_cv_func_strlcpy" = xyes
then :
  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h

else case e in #(
  e) case " $LIBOBJS " in
  *" strlcpy.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
 ;;
esac
 ;;
esac
fi
ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
if test "x$ac_cv_func_explicit_bzero" = xyes
then :
  printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h

else case e in #(
  e) case " $LIBOBJS " in
  *" explicit_bzero.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
 ;;
esac
 ;;
esac
fi
ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
if test "x$ac_cv_func_getopt" = xyes
then :
  printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h

else case e in #(
  e) case " $LIBOBJS " in
  *" getopt.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
 ;;
esac
 ;;
esac
fi

ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = xyes
then :

else case e in #(
  e)
printf "%s\n" "#define size_t unsigned int" >>confdefs.h
 ;;
esac
fi

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
printf %s "checking for working alloca.h... " >&6; }
if test ${ac_cv_working_alloca_h+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <alloca.h>
int
main (void)
{
char *p = (char *) alloca (2 * sizeof (int));
			  if (p) return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_working_alloca_h=yes
else case e in #(
  e) ac_cv_working_alloca_h=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
if test $ac_cv_working_alloca_h = yes; then

printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
printf %s "checking for alloca... " >&6; }
if test ${ac_cv_func_alloca_works+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h
if test "$ac_cv_func_alloca_works" != yes
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <stddef.h>
#ifndef alloca
# ifdef __GNUC__
#  define alloca __builtin_alloca
# elif defined _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  ifdef  __cplusplus
extern "C"
#  endif
void *alloca (size_t);
# endif
#endif

int
main (void)
{
char *p = (char *) alloca (1);
				    if (p) return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_func_alloca_works=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
printf "%s\n" "$ac_cv_func_alloca_works" >&6; }

if test $ac_cv_func_alloca_works = yes; then

printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h

else
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble.  Some versions do not even contain alloca or
# contain a buggy version.  If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.

ALLOCA=\${LIBOBJDIR}alloca.$ac_objext

printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
printf %s "checking stack direction for C alloca... " >&6; }
if test ${ac_cv_c_stack_direction+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_c_stack_direction=0
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
find_stack_direction (int *addr, int depth)
{
  int dir, dummy = 0;
  if (! addr)
    addr = &dummy;
  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
  return dir + dummy;
}

int
main (int argc, char **argv)
{
  return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_c_stack_direction=1
else case e in #(
  e) ac_cv_c_stack_direction=-1 ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h


fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of reentrant time-related functions" >&5
printf %s "checking for type of reentrant time-related functions... " >&6; }
if test ${php_cv_time_r_type+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_time_r_type=POSIX
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <time.h>

int main(void) {
char buf[27];
struct tm t;
time_t old = 0;
int r, s;

s = gmtime_r(&old, &t);
r = (int) asctime_r(&t, buf, 26);
if (r == s && s == 0) return (0);
return (1);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_time_r_type=hpux
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_time_r_type=POSIX
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <time.h>
int main(void) {
  struct tm t, *s;
  time_t old = 0;
  char buf[27], *p;

  s = gmtime_r(&old, &t);
  p = asctime_r(&t, buf, 26);
  if (p == buf && s == &t) return (0);
  return (1);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_time_r_type=irix
else case e in #(
  e) php_cv_time_r_type=POSIX ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_time_r_type" >&5
printf "%s\n" "$php_cv_time_r_type" >&6; }
case $php_cv_time_r_type in #(
  hpux) :

printf "%s\n" "#define PHP_HPUX_TIME_R 1" >>confdefs.h
 ;; #(
  irix) :

printf "%s\n" "#define PHP_IRIX_TIME_R 1" >>confdefs.h
 ;; #(
  *) :
     ;;
esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for aarch64 CRC32 API" >&5
printf %s "checking for aarch64 CRC32 API... " >&6; }
if test ${php_cv_func___crc32d+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <arm_acle.h>
# if defined(__GNUC__)
#  if!defined(__clang__)
#   pragma GCC push_options
#   pragma GCC target ("+nothing+crc")
#  elif defined(__APPLE__)
#   pragma clang attribute push(__attribute__((target("crc"))), apply_to=function)
#  else
#   pragma clang attribute push(__attribute__((target("+nothing+crc"))), apply_to=function)
#  endif
# endif

int
main (void)
{
__crc32d(0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_func___crc32d=yes
else case e in #(
  e) php_cv_func___crc32d=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func___crc32d" >&5
printf "%s\n" "$php_cv_func___crc32d" >&6; }
if test "x$php_cv_func___crc32d" = xyes
then :

printf "%s\n" "#define HAVE_AARCH64_CRC32 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for asm goto" >&5
printf %s "checking for asm goto... " >&6; }
if test ${php_cv_have__asm_goto+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

#if defined(__x86_64__) || defined(__i386__)
  __asm__ goto("jmp %l0\n" :::: end);
#elif defined(__aarch64__)
  __asm__ goto("b %l0\n" :::: end);
#endif
end:
  return 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have__asm_goto=yes
else case e in #(
  e) php_cv_have__asm_goto=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have__asm_goto" >&5
printf "%s\n" "$php_cv_have__asm_goto" >&6; }
if test "x$php_cv_have__asm_goto" = xyes
then :

printf "%s\n" "#define HAVE_ASM_GOTO 1" >>confdefs.h

fi


php_with_valgrind=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Valgrind support" >&5
printf %s "checking whether to enable Valgrind support... " >&6; }

# Check whether --with-valgrind was given.
if test ${with_valgrind+y}
then :
  withval=$with_valgrind; PHP_VALGRIND=$withval
else case e in #(
  e)
  PHP_VALGRIND=no

 ;;
esac
fi


ext_output=$PHP_VALGRIND
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_VALGRIND" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for valgrind" >&5
printf %s "checking for valgrind... " >&6; }

if test -n "$VALGRIND_CFLAGS"; then
    pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind\""; } >&5
  ($PKG_CONFIG --exists --print-errors "valgrind") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_VALGRIND_CFLAGS=`$PKG_CONFIG --cflags "valgrind" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$VALGRIND_LIBS"; then
    pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind\""; } >&5
  ($PKG_CONFIG --exists --print-errors "valgrind") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_VALGRIND_LIBS=`$PKG_CONFIG --libs "valgrind" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "valgrind" 2>&1`
        else
	        VALGRIND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "valgrind" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$VALGRIND_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (valgrind) were not met:

$VALGRIND_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables VALGRIND_CFLAGS
and VALGRIND_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables VALGRIND_CFLAGS
and VALGRIND_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	VALGRIND_CFLAGS=$pkg_cv_VALGRIND_CFLAGS
	VALGRIND_LIBS=$pkg_cv_VALGRIND_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

  for ac_i in $VALGRIND_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


printf "%s\n" "#define HAVE_VALGRIND 1" >>confdefs.h

fi
  save_CFLAGS=$CFLAGS
  CFLAGS="$CFLAGS $VALGRIND_CFLAGS"
  ac_fn_c_check_header_compile "$LINENO" "valgrind/cachegrind.h" "ac_cv_header_valgrind_cachegrind_h" "$ac_includes_default"
if test "x$ac_cv_header_valgrind_cachegrind_h" = xyes
then :
  printf "%s\n" "#define HAVE_VALGRIND_CACHEGRIND_H 1" >>confdefs.h

fi

  CFLAGS=$save_CFLAGS
 ;;
esac
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${T_MD}General settings${T_ME}" >&5
printf "%s\n" "${T_MD}General settings${T_ME}" >&6; }


# Check whether --enable- was given.
if test ${enable_+y}
then :
  enableval=$enable_;
fi



php_enable_gcov=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to include gcov symbols" >&5
printf %s "checking whether to include gcov symbols... " >&6; }
# Check whether --enable-gcov was given.
if test ${enable_gcov+y}
then :
  enableval=$enable_gcov; PHP_GCOV=$enableval
else case e in #(
  e)
  PHP_GCOV=no

 ;;
esac
fi


ext_output=$PHP_GCOV
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_GCOV" = xyes
then :

  if test "x$GCC" = xyes
then :

else case e in #(
  e) as_fn_error $? "GNU C compatible compiler is required for --enable-gcov" "$LINENO" 5 ;;
esac
fi

    case $($php_shtool path $CC) in #(
  *ccache*) :
    gcc_ccache=yes ;; #(
  *) :
    gcc_ccache=no ;;
esac

  if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
    as_fn_error $? "ccache must be disabled when --enable-gcov option is used. You can disable
ccache by setting environment variable CCACHE_DISABLE=1." "$LINENO" 5
  fi


printf "%s\n" "#define HAVE_GCOV 1" >>confdefs.h

    src=$abs_srcdir/build/Makefile.gcov
  ac_srcdir=$abs_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments



  sed_script='s/\([\t ]\|^\)-O\([0-9gsz]\|fast\|\)\([\t ]\|$\)/\1/g'
  CFLAGS=$(echo "$CFLAGS" | $SED -e "$sed_script")
  CXXFLAGS=$(echo "$CXXFLAGS" | $SED -e "$sed_script")


    CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
  CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"

fi


php_enable_debug=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to include debugging symbols" >&5
printf %s "checking whether to include debugging symbols... " >&6; }
# Check whether --enable-debug was given.
if test ${enable_debug+y}
then :
  enableval=$enable_debug; PHP_DEBUG=$enableval
else case e in #(
  e)
  PHP_DEBUG=no

 ;;
esac
fi


ext_output=$PHP_DEBUG
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_DEBUG" = xyes
then :

  PHP_DEBUG=1
  ZEND_DEBUG=yes
  CFLAGS="$CFLAGS -UNDEBUG"
  CXXFLAGS="$CXXFLAGS -UNDEBUG"

  sed_script='s/\([\t ]\|^\)-O\([0-9gsz]\|fast\|\)\([\t ]\|$\)/\1/g'
  CFLAGS=$(echo "$CFLAGS" | $SED -e "$sed_script")
  CXXFLAGS=$(echo "$CXXFLAGS" | $SED -e "$sed_script")

    if test "$GCC" = "yes" || test "$ICC" = "yes"; then
    CFLAGS="$CFLAGS -O0"
    CXXFLAGS="$CXXFLAGS -g -O0"
  fi
  if test "$SUNCC" = "yes"; then
    if test -n "$auto_cflags"; then
      CFLAGS="-g"
      CXXFLAGS="-g"
    else
      CFLAGS="$CFLAGS -g"
      CXXFLAGS="$CFLAGS -g"
    fi
  fi

else case e in #(
  e)
  PHP_DEBUG=0
  ZEND_DEBUG=no
  CFLAGS="$CFLAGS -DNDEBUG"
  CXXFLAGS="$CXXFLAGS -DNDEBUG"
 ;;
esac
fi


php_enable_debug_assertions=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable debug assertions in release mode" >&5
printf %s "checking whether to enable debug assertions in release mode... " >&6; }
# Check whether --enable-debug-assertions was given.
if test ${enable_debug_assertions+y}
then :
  enableval=$enable_debug_assertions; PHP_DEBUG_ASSERTIONS=$enableval
else case e in #(
  e)
  PHP_DEBUG_ASSERTIONS=no

 ;;
esac
fi


ext_output=$PHP_DEBUG_ASSERTIONS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_DEBUG_ASSERTIONS" = xyes
then :

  PHP_DEBUG=1
  ZEND_DEBUG=yes
  CFLAGS="$CFLAGS -UNDEBUG"
  CXXFLAGS="$CXXFLAGS -UNDEBUG"

fi

# Check whether --enable-zts was given.
if test ${enable_zts+y}
then :
  enableval=$enable_zts; ZEND_ZTS=$enableval
else case e in #(
  e) ZEND_ZTS=no ;;
esac
fi


if test "x$ZEND_ZTS" = xyes
then :
  PHP_THREAD_SAFETY=yes
else case e in #(
  e) PHP_THREAD_SAFETY=no ;;
esac
fi

if test "x$PHP_THREAD_SAFETY" = xyes
then :

  if test "x$pthreads_working" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Unable to verify system support for POSIX Threads, which are required for PHP
thread safety (ZTS) build.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX threads" >&5
printf %s "checking for POSIX threads... " >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


php_enable_rtld_now=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY" >&5
printf %s "checking whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY... " >&6; }
# Check whether --enable-rtld-now was given.
if test ${enable_rtld_now+y}
then :
  enableval=$enable_rtld_now; PHP_RTLD_NOW=$enableval
else case e in #(
  e)
  PHP_RTLD_NOW=no

 ;;
esac
fi


ext_output=$PHP_RTLD_NOW
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_RTLD_NOW" = xyes
then :

printf "%s\n" "#define PHP_USE_RTLD_NOW 1" >>confdefs.h

fi


php_with_layout=PHP

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking layout of installed files" >&5
printf %s "checking layout of installed files... " >&6; }

# Check whether --with-layout was given.
if test ${with_layout+y}
then :
  withval=$with_layout; PHP_LAYOUT=$withval
else case e in #(
  e)
  PHP_LAYOUT=PHP

 ;;
esac
fi


ext_output=$PHP_LAYOUT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




case $PHP_LAYOUT in #(
  GNU) :
    oldstyleextdir=no ;; #(
  *) :
    oldstyleextdir=yes ;;
esac


php_with_config_file_path=DEFAULT

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking path to configuration file" >&5
printf %s "checking path to configuration file... " >&6; }

# Check whether --with-config-file-path was given.
if test ${with_config_file_path+y}
then :
  withval=$with_config_file_path; PHP_CONFIG_FILE_PATH=$withval
else case e in #(
  e)
  PHP_CONFIG_FILE_PATH=DEFAULT

 ;;
esac
fi


ext_output=$PHP_CONFIG_FILE_PATH
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_CONFIG_FILE_PATH" = xDEFAULT
then :
  case $PHP_LAYOUT in #(
  GNU) :
    PHP_CONFIG_FILE_PATH=$sysconfdir ;; #(
  *) :
    PHP_CONFIG_FILE_PATH=$libdir ;;
esac
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to scan for configuration files" >&5
printf %s "checking where to scan for configuration files... " >&6; }

php_with_config_file_scan_dir=DEFAULT



# Check whether --with-config-file-scan-dir was given.
if test ${with_config_file_scan_dir+y}
then :
  withval=$with_config_file_scan_dir; PHP_CONFIG_FILE_SCAN_DIR=$withval
else case e in #(
  e)
  PHP_CONFIG_FILE_SCAN_DIR=DEFAULT

 ;;
esac
fi


ext_output=$PHP_CONFIG_FILE_SCAN_DIR





if test "x$PHP_CONFIG_FILE_SCAN_DIR" = xDEFAULT
then :
  PHP_CONFIG_FILE_SCAN_DIR=
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PHP_CONFIG_FILE_SCAN_DIR" >&5
printf "%s\n" "$PHP_CONFIG_FILE_SCAN_DIR" >&6; }


php_enable_sigchild=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable PHP's own SIGCHLD handler" >&5
printf %s "checking whether to enable PHP's own SIGCHLD handler... " >&6; }
# Check whether --enable-sigchild was given.
if test ${enable_sigchild+y}
then :
  enableval=$enable_sigchild; PHP_SIGCHILD=$enableval
else case e in #(
  e)
  PHP_SIGCHILD=no

 ;;
esac
fi


ext_output=$PHP_SIGCHILD
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





if test "x$PHP_SIGCHILD" = xyes
then :
  printf "%s\n" "#define PHP_SIGCHILD 1" >>confdefs.h

else case e in #(
  e) printf "%s\n" "#define PHP_SIGCHILD 0" >>confdefs.h
 ;;
esac
fi


php_enable_libgcc=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to explicitly link against libgcc" >&5
printf %s "checking whether to explicitly link against libgcc... " >&6; }
# Check whether --enable-libgcc was given.
if test ${enable_libgcc+y}
then :
  enableval=$enable_libgcc; PHP_LIBGCC=$enableval
else case e in #(
  e)
  PHP_LIBGCC=no

 ;;
esac
fi


ext_output=$PHP_LIBGCC
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_LIBGCC" = xyes
then :



  libgcc_libpath=$(gcc --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%')


  if ${libgcc_libpath:+false} :
then :
  as_fn_error $? "Cannot locate libgcc. Make sure that gcc is in your path" "$LINENO" 5
fi

  if test "$libgcc_libpath" != "/usr/$PHP_LIBDIR" && test "$libgcc_libpath" != "/usr/lib"; then

  if test -z "$libgcc_libpath" || echo "$libgcc_libpath" | grep '^/' >/dev/null ; then
    ai_p=$libgcc_libpath
  else

    ep_dir=$(echo $libgcc_libpath|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$libgcc_libpath")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi



  case gcc in
  c|c_r) ;;
  *)
      LIBS="$LIBS -lgcc"
   ;;
  esac



fi


php_enable_short_tags=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable short tags by default" >&5
printf %s "checking whether to enable short tags by default... " >&6; }
# Check whether --enable-short-tags was given.
if test ${enable_short_tags+y}
then :
  enableval=$enable_short_tags; PHP_SHORT_TAGS=$enableval
else case e in #(
  e)
  PHP_SHORT_TAGS=yes

 ;;
esac
fi


ext_output=$PHP_SHORT_TAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





if test "x$PHP_SHORT_TAGS" = xyes
then :
  printf "%s\n" "#define DEFAULT_SHORT_OPEN_TAG \"1\"" >>confdefs.h

else case e in #(
  e) printf "%s\n" "#define DEFAULT_SHORT_OPEN_TAG \"0\"" >>confdefs.h
 ;;
esac
fi


php_enable_dmalloc=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable dmalloc" >&5
printf %s "checking whether to enable dmalloc... " >&6; }
# Check whether --enable-dmalloc was given.
if test ${enable_dmalloc+y}
then :
  enableval=$enable_dmalloc; PHP_DMALLOC=$enableval
else case e in #(
  e)
  PHP_DMALLOC=no

 ;;
esac
fi


ext_output=$PHP_DMALLOC
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_DMALLOC" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dmalloc_error in -ldmalloc" >&5
printf %s "checking for dmalloc_error in -ldmalloc... " >&6; }
if test ${ac_cv_lib_dmalloc_dmalloc_error+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldmalloc  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dmalloc_error (void);
int
main (void)
{
return dmalloc_error ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_dmalloc_dmalloc_error=yes
else case e in #(
  e) ac_cv_lib_dmalloc_dmalloc_error=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmalloc_dmalloc_error" >&5
printf "%s\n" "$ac_cv_lib_dmalloc_dmalloc_error" >&6; }
if test "x$ac_cv_lib_dmalloc_dmalloc_error" = xyes
then :


  case dmalloc in
  c|c_r) ;;
  *)
      LIBS="-ldmalloc $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_DMALLOC 1" >>confdefs.h

      as_fn_append CPPFLAGS " -DDMALLOC_FUNC_CHECK"
else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The dmalloc check failed. Cannot enable dmalloc.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

fi


php_enable_ipv6=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable IPv6 support" >&5
printf %s "checking whether to enable IPv6 support... " >&6; }
# Check whether --enable-ipv6 was given.
if test ${enable_ipv6+y}
then :
  enableval=$enable_ipv6; PHP_IPV6=$enableval
else case e in #(
  e)
  PHP_IPV6=yes

 ;;
esac
fi


ext_output=$PHP_IPV6
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_IPV6" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 support" >&5
printf %s "checking for IPv6 support... " >&6; }
if test ${php_cv_have_ipv6+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

      #include <sys/types.h>
      #include <sys/socket.h>
      #include <netinet/in.h>

int
main (void)
{

      struct sockaddr_in6 s;
      struct in6_addr t = in6addr_any;
      int i = AF_INET6;
      (void)s;
      t.s6_addr[0] = 0;
      (void)i;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have_ipv6=yes
else case e in #(
  e) php_cv_have_ipv6=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_ipv6" >&5
printf "%s\n" "$php_cv_have_ipv6" >&6; }

fi
if test "x$php_cv_have_ipv6" = xyes
then :

printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h

fi


php_enable_dtrace=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable DTrace support" >&5
printf %s "checking whether to enable DTrace support... " >&6; }
# Check whether --enable-dtrace was given.
if test ${enable_dtrace+y}
then :
  enableval=$enable_dtrace; PHP_DTRACE=$enableval
else case e in #(
  e)
  PHP_DTRACE=no

 ;;
esac
fi


ext_output=$PHP_DTRACE
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_DTRACE" = xyes
then :

  ac_fn_c_check_header_compile "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_sdt_h" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Cannot find required <sys/sdt.h> to enable DTrace support.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi


  case "" in
    "") ac_srcdir="$abs_srcdir/"; unset ac_bdir;;
    /*) ac_srcdir=$(echo ""|cut -c 2-)"/"; ac_bdir=$ac_srcdir;;
    *) ac_srcdir="$abs_srcdir/Zend/zend_dtrace.d/"; ac_bdir="/";;
  esac

  ac_provsrc=Zend/zend_dtrace.d
  old_IFS=$IFS
  IFS=.
  set $ac_provsrc
  ac_provobj=$1
  IFS=$old_IFS

  ac_hdrobj=Zend/zend_dtrace_gen.h

  case $host_alias in
  *freebsd*)
    PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_provsrc.lo"
    PHP_LDFLAGS="$PHP_LDFLAGS -lelf"
    ;;
  *solaris*)
    PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_provsrc.lo"
    ;;
  *linux*)
    PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_provsrc.lo"
    ;;
  esac

  old_IFS=$IFS
  for ac_src in main/main.c Zend/zend_API.c Zend/zend_dtrace.c Zend/zend_exceptions.c Zend/zend_execute.c Zend/zend.c; do
    IFS=.
    set $ac_src
    ac_obj=$1
    IFS=$old_IFS

    PHP_DTRACE_OBJS="$PHP_DTRACE_OBJS $ac_bdir$ac_obj.lo"
  done;

  case $php_sapi_module in
  shared)
    for ac_lo in $PHP_DTRACE_OBJS; do
      dtrace_objs="$dtrace_objs $(echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#')"
    done;
    ;;
  *)
    dtrace_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
    ;;
  esac

  cat>>Makefile.objects<<EOF

$abs_srcdir/$ac_provsrc:;

$ac_bdir$ac_hdrobj: $abs_srcdir/$ac_provsrc
	CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir$ac_provsrc -o \$@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$@.bak > \$@

\$(PHP_DTRACE_OBJS): $ac_bdir$ac_hdrobj

EOF

  case $host_alias in
  *solaris*|*linux*|*freebsd*)
    dtrace_prov_name="$(echo $ac_provsrc | $SED -e 's#\(.*\)\/##').o"
    dtrace_lib_dir="$(echo $ac_bdir$ac_provsrc | $SED -e 's#\(.*\)/[^/]*#\1#')/.libs"
    dtrace_d_obj="$(echo $ac_bdir$ac_provsrc | $SED -e 's#\(.*\)/\([^/]*\)#\1/.libs/\2#').o"
    dtrace_nolib_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
    for ac_lo in $PHP_DTRACE_OBJS; do
      dtrace_lib_objs="$dtrace_lib_objs $(echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#')"
    done;
        cat>>Makefile.objects<<EOF
$ac_bdir$ac_provsrc.lo: \$(PHP_DTRACE_OBJS)
	echo "# Generated by Makefile for libtool" > \$@
	@test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
	if CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then \\
	  echo "pic_object='.libs/$dtrace_prov_name'" >> \$@ ;\\
	else \\
	  echo "pic_object='none'" >> \$@ ;\\
	fi
	if CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir$ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir$ac_provsrc.o"; then \\
	  echo "non_pic_object='$dtrace_prov_name'" >> \$@ ;\\
	else \\
	  echo "non_pic_object='none'" >> \$@ ;\\
	fi

EOF

    ;;
  *)
cat>>Makefile.objects<<EOF
$ac_bdir$ac_provsrc.o: \$(PHP_DTRACE_OBJS)
	CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$@ -s $abs_srcdir/$ac_provsrc $dtrace_objs

EOF
    ;;
  esac


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_DTRACE_OBJS"



printf "%s\n" "#define HAVE_DTRACE 1" >>confdefs.h


fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how big to make fd sets" >&5
printf %s "checking how big to make fd sets... " >&6; }

php_enable_fd_setsize=no


# Check whether --enable-fd-setsize was given.
if test ${enable_fd_setsize+y}
then :
  enableval=$enable_fd_setsize; PHP_FD_SETSIZE=$enableval
else case e in #(
  e)
  PHP_FD_SETSIZE=no

 ;;
esac
fi


ext_output=$PHP_FD_SETSIZE





if test "x$PHP_FD_SETSIZE" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using system default" >&5
printf "%s\n" "using system default" >&6; }
else case e in #(
  e)
  if test "0$PHP_FD_SETSIZE" -gt 0 2>/dev/null; then
    CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PHP_FD_SETSIZE"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $PHP_FD_SETSIZE" >&5
printf "%s\n" "using $PHP_FD_SETSIZE" >&6; }
  else
    as_fn_error $? "Invalid value passed to --enable-fd-setsize!" "$LINENO" 5
  fi
 ;;
esac
fi


php_enable_werror=no


# Check whether --enable-werror was given.
if test ${enable_werror+y}
then :
  enableval=$enable_werror; PHP_WERROR=$enableval
else case e in #(
  e)
  PHP_WERROR=no

 ;;
esac
fi


ext_output=$PHP_WERROR





php_enable_memory_sanitizer=no


# Check whether --enable-memory-sanitizer was given.
if test ${enable_memory_sanitizer+y}
then :
  enableval=$enable_memory_sanitizer; PHP_MEMORY_SANITIZER=$enableval
else case e in #(
  e)
  PHP_MEMORY_SANITIZER=no

 ;;
esac
fi


ext_output=$PHP_MEMORY_SANITIZER





php_enable_address_sanitizer=no


# Check whether --enable-address-sanitizer was given.
if test ${enable_address_sanitizer+y}
then :
  enableval=$enable_address_sanitizer; PHP_ADDRESS_SANITIZER=$enableval
else case e in #(
  e)
  PHP_ADDRESS_SANITIZER=no

 ;;
esac
fi


ext_output=$PHP_ADDRESS_SANITIZER





php_enable_undefined_sanitizer=no


# Check whether --enable-undefined-sanitizer was given.
if test ${enable_undefined_sanitizer+y}
then :
  enableval=$enable_undefined_sanitizer; PHP_UNDEFINED_SANITIZER=$enableval
else case e in #(
  e)
  PHP_UNDEFINED_SANITIZER=no

 ;;
esac
fi


ext_output=$PHP_UNDEFINED_SANITIZER






# Check whether --enable- was given.
if test ${enable_+y}
then :
  enableval=$enable_;
fi



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${T_MD}Configuring extensions${T_ME}" >&5
printf "%s\n" "${T_MD}Configuring extensions${T_ME}" >&6; }


# Check whether --enable-all was given.
if test ${enable_all+y}
then :
  enableval=$enable_all; PHP_ENABLE_ALL=$enableval
fi





ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default"
if test "x$ac_cv_header_io_h" = xyes
then :
  printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h

fi


ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
if test "x$ac_cv_func_strtoll" = xyes
then :
  printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "atoll" "ac_cv_func_atoll"
if test "x$ac_cv_func_atoll" = xyes
then :
  printf "%s\n" "#define HAVE_ATOLL 1" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wno-implicit-fallthrough" >&5
printf %s "checking whether the C compiler accepts -Wno-implicit-fallthrough... " >&6; }
if test ${ax_cv_check_cflags___Wno_implicit_fallthrough+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wno-implicit-fallthrough $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wno_implicit_fallthrough=yes
else case e in #(
  e) ax_cv_check_cflags___Wno_implicit_fallthrough=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_implicit_fallthrough" >&5
printf "%s\n" "$ax_cv_check_cflags___Wno_implicit_fallthrough" >&6; }
if test "x$ax_cv_check_cflags___Wno_implicit_fallthrough" = xyes
then :
  PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -Wno-implicit-fallthrough"
else case e in #(
  e) : ;;
esac
fi


PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -DHAVE_TIMELIB_CONFIG_H=1"
PHP_TIMELIB_CFLAGS="$PHP_DATE_CFLAGS"
PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fwrapv" >&5
printf %s "checking whether the C compiler accepts -fwrapv... " >&6; }
if test ${ax_cv_check_cflags___fwrapv+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -fwrapv $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___fwrapv=yes
else case e in #(
  e) ax_cv_check_cflags___fwrapv=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fwrapv" >&5
printf "%s\n" "$ax_cv_check_cflags___fwrapv" >&6; }
if test "x$ax_cv_check_cflags___fwrapv" = xyes
then :
  PHP_TIMELIB_CFLAGS="$PHP_TIMELIB_CFLAGS -fwrapv"
else case e in #(
  e) : ;;
esac
fi


timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c
                 lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"


  ext_builddir=ext/date
  ext_srcdir=$abs_srcdir/ext/date
  ext_dir=ext/date

  ac_extra=$(echo "$PHP_DATE_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_DATE_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_date.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC date;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC date;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_DATE_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_date.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_date="$shared_objects_date $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/date.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/date.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_date"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/date.$suffix: $ext_builddir/date.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/date.$suffix \$(phplibdir)

$ext_builddir/date.$suffix: \$(shared_objects_date) \$(DATE_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_date) \$(DATE_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_DATE 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_DATE_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_date.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC date;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_date.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC date;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=date

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi




  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $timelib_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_TIMELIB_CFLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_TIMELIB_CFLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_TIMELIB_CFLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $PHP_TIMELIB_CFLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done



$php_shtool mkdir -p $ext_builddir/lib


for include_path in $ext_builddir/lib; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


for include_path in $ext_srcdir/lib; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done



    header_path=ext/date
    for header_file in php_date.h lib/timelib.h lib/timelib_config.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



printf "%s\n" "#define HAVE_TIMELIB_CONFIG_H 1" >>confdefs.h


cat > $ext_builddir/lib/timelib_config.h <<EOF
#ifdef PHP_WIN32
# include "config.w32.h"
#else
# include <php_config.h>
#endif
#include <inttypes.h>
#include <stdint.h>

#include "zend.h"

#define timelib_malloc  emalloc
#define timelib_realloc erealloc
#define timelib_calloc  ecalloc
#define timelib_strdup  estrdup
#define timelib_strndup estrndup
#define timelib_free    efree
EOF





php_with_libxml=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with LIBXML support" >&5
printf %s "checking whether to build with LIBXML support... " >&6; }

# Check whether --with-libxml was given.
if test ${with_libxml+y}
then :
  withval=$with_libxml; PHP_LIBXML=$withval
else case e in #(
  e)
  PHP_LIBXML=yes
  test "$PHP_ENABLE_ALL" && PHP_LIBXML=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_LIBXML in
shared,*)
  PHP_LIBXML=$(echo "$PHP_LIBXML"|$SED 's/^shared,//')
  ;;
shared)
  PHP_LIBXML=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_LIBXML" != "no"; then
    ext_shared=no



pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.9.4" >&5
printf %s "checking for libxml-2.0 >= 2.9.4... " >&6; }

if test -n "$LIBXML_CFLAGS"; then
    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBXML_LIBS"; then
    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        else
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBXML_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libxml-2.0 >= 2.9.4) were not met:

$LIBXML_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $LIBXML_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBXML_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LIBXML_SHARED_LIBADD="$LIBXML_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LIBXML_SHARED_LIBADD="$LIBXML_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LIBXML_SHARED_LIBADD="-L$ai_p $LIBXML_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LIBXML_SHARED_LIBADD="$ld_runpath_switch$ai_p $LIBXML_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_LIBXML 1" >>confdefs.h


  ext_builddir=ext/libxml
  ext_srcdir=$abs_srcdir/ext/libxml
  ext_dir=ext/libxml

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_LIBXML_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in libxml.c mime_sniff.c image_svg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC libxml;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC libxml;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_LIBXML_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in libxml.c mime_sniff.c image_svg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_libxml="$shared_objects_libxml $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/libxml.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/libxml.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_libxml"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/libxml.$suffix: $ext_builddir/libxml.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/libxml.$suffix \$(phplibdir)

$ext_builddir/libxml.$suffix: \$(shared_objects_libxml) \$(LIBXML_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_libxml) \$(LIBXML_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_LIBXML 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_LIBXML_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in libxml.c mime_sniff.c image_svg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC libxml;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in libxml.c mime_sniff.c image_svg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC libxml;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=libxml

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/libxml
    for header_file in php_libxml.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done




fi





php_with_openssl=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL support" >&5
printf %s "checking for OpenSSL support... " >&6; }

# Check whether --with-openssl was given.
if test ${with_openssl+y}
then :
  withval=$with_openssl; PHP_OPENSSL=$withval
else case e in #(
  e)
  PHP_OPENSSL=no
  test "$PHP_ENABLE_ALL" && PHP_OPENSSL=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_OPENSSL in
shared,*)
  PHP_OPENSSL=$(echo "$PHP_OPENSSL"|$SED 's/^shared,//')
  ;;
shared)
  PHP_OPENSSL=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_system_ciphers=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use system default cipher list instead of hardcoded value" >&5
printf %s "checking whether to use system default cipher list instead of hardcoded value... " >&6; }

# Check whether --with-system-ciphers was given.
if test ${with_system_ciphers+y}
then :
  withval=$with_system_ciphers; PHP_SYSTEM_CIPHERS=$withval
else case e in #(
  e)
  PHP_SYSTEM_CIPHERS=no

 ;;
esac
fi


ext_output=$PHP_SYSTEM_CIPHERS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_openssl_legacy_provider=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to load legacy algorithm provider" >&5
printf %s "checking whether to load legacy algorithm provider... " >&6; }

# Check whether --with-openssl-legacy-provider was given.
if test ${with_openssl_legacy_provider+y}
then :
  withval=$with_openssl_legacy_provider; PHP_OPENSSL_LEGACY_PROVIDER=$withval
else case e in #(
  e)
  PHP_OPENSSL_LEGACY_PROVIDER=no

 ;;
esac
fi


ext_output=$PHP_OPENSSL_LEGACY_PROVIDER
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_openssl_argon2=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable argon2 password hashing (requires OpenSSL >= 3.2)" >&5
printf %s "checking whether to enable argon2 password hashing (requires OpenSSL >= 3.2)... " >&6; }

# Check whether --with-openssl-argon2 was given.
if test ${with_openssl_argon2+y}
then :
  withval=$with_openssl_argon2; PHP_OPENSSL_ARGON2=$withval
else case e in #(
  e)
  PHP_OPENSSL_ARGON2=no

 ;;
esac
fi


ext_output=$PHP_OPENSSL_ARGON2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_OPENSSL" != "no"; then

  ext_builddir=ext/openssl
  ext_srcdir=$abs_srcdir/ext/openssl
  ext_dir=ext/openssl

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_OPENSSL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in openssl.c openssl_pwhash.c openssl_backend_common.c openssl_backend_v1.c openssl_backend_v3.c xp_ssl.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC openssl;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC openssl;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_OPENSSL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in openssl.c openssl_pwhash.c openssl_backend_common.c openssl_backend_v1.c openssl_backend_v3.c xp_ssl.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_openssl="$shared_objects_openssl $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/openssl.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/openssl.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_openssl"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/openssl.$suffix: $ext_builddir/openssl.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/openssl.$suffix \$(phplibdir)

$ext_builddir/openssl.$suffix: \$(shared_objects_openssl) \$(OPENSSL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_openssl) \$(OPENSSL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_OPENSSL 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_OPENSSL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in openssl.c openssl_pwhash.c openssl_backend_common.c openssl_backend_v1.c openssl_backend_v3.c xp_ssl.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC openssl;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in openssl.c openssl_pwhash.c openssl_backend_common.c openssl_backend_v1.c openssl_backend_v3.c xp_ssl.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC openssl;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=openssl

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST OPENSSL_SHARED_LIBADD"


  found_openssl=no


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl >= 1.1.1" >&5
printf %s "checking for openssl >= 1.1.1... " >&6; }

if test -n "$OPENSSL_CFLAGS"; then
    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl >= 1.1.1" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$OPENSSL_LIBS"; then
    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl >= 1.1.1" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
        else
	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$OPENSSL_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (openssl >= 1.1.1) were not met:

$OPENSSL_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	found_openssl=yes
fi

  if test "$found_openssl" = "yes"; then

  for ac_i in $OPENSSL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        OPENSSL_SHARED_LIBADD="-L$ai_p $OPENSSL_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && OPENSSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $OPENSSL_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $OPENSSL_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


printf "%s\n" "#define HAVE_OPENSSL_EXT 1" >>confdefs.h

  fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$OPENSSL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
printf %s "checking for RAND_egd in -lcrypto... " >&6; }
if test ${ac_cv_lib_crypto_RAND_egd+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypto  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char RAND_egd (void);
int
main (void)
{
return RAND_egd ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_crypto_RAND_egd=yes
else case e in #(
  e) ac_cv_lib_crypto_RAND_egd=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
printf "%s\n" "$ac_cv_lib_crypto_RAND_egd" >&6; }
if test "x$ac_cv_lib_crypto_RAND_egd" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_RAND_EGD 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_crypto_RAND_egd

   ;;
esac
fi


  if test "x$PHP_SYSTEM_CIPHERS" = xno
then :

else case e in #(
  e)
printf "%s\n" "#define USE_OPENSSL_SYSTEM_CIPHERS 1" >>confdefs.h
 ;;
esac
fi

  if test "x$PHP_OPENSSL_LEGACY_PROVIDER" = xno
then :

else case e in #(
  e)
printf "%s\n" "#define LOAD_OPENSSL_LEGACY_PROVIDER 1" >>confdefs.h
 ;;
esac
fi

  if test "x$PHP_OPENSSL_ARGON2" = xno
then :

else case e in #(
  e)

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$OPENSSL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OSSL_set_max_threads in -lcrypto" >&5
printf %s "checking for OSSL_set_max_threads in -lcrypto... " >&6; }
if test ${ac_cv_lib_crypto_OSSL_set_max_threads+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypto  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char OSSL_set_max_threads (void);
int
main (void)
{
return OSSL_set_max_threads ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_crypto_OSSL_set_max_threads=yes
else case e in #(
  e) ac_cv_lib_crypto_OSSL_set_max_threads=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_OSSL_set_max_threads" >&5
printf "%s\n" "$ac_cv_lib_crypto_OSSL_set_max_threads" >&6; }
if test "x$ac_cv_lib_crypto_OSSL_set_max_threads" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_OPENSSL_ARGON2 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_crypto_OSSL_set_max_threads
    as_fn_error $? "argon2 hashing requires OpenSSL 3.2" "$LINENO" 5
   ;;
esac
fi

   ;;
esac
fi
fi





php_with_external_pcre=no



# Check whether --with-external-pcre was given.
if test ${with_external_pcre+y}
then :
  withval=$with_external_pcre; PHP_EXTERNAL_PCRE=$withval
else case e in #(
  e)
  PHP_EXTERNAL_PCRE=no

 ;;
esac
fi


ext_output=$PHP_EXTERNAL_PCRE






php_with_pcre_jit=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable PCRE JIT functionality" >&5
printf %s "checking whether to enable PCRE JIT functionality... " >&6; }

# Check whether --with-pcre-jit was given.
if test ${with_pcre_jit+y}
then :
  withval=$with_pcre_jit; PHP_PCRE_JIT=$withval
else case e in #(
  e)
  PHP_PCRE_JIT=yes

 ;;
esac
fi


ext_output=$PHP_PCRE_JIT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }







if test "$PHP_EXTERNAL_PCRE" != "no"; then

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpcre2-8 >= 10.30" >&5
printf %s "checking for libpcre2-8 >= 10.30... " >&6; }

if test -n "$PCRE2_CFLAGS"; then
    pkg_cv_PCRE2_CFLAGS="$PCRE2_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8 >= 10.30\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpcre2-8 >= 10.30") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PCRE2_CFLAGS=`$PKG_CONFIG --cflags "libpcre2-8 >= 10.30" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$PCRE2_LIBS"; then
    pkg_cv_PCRE2_LIBS="$PCRE2_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8 >= 10.30\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpcre2-8 >= 10.30") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PCRE2_LIBS=`$PKG_CONFIG --libs "libpcre2-8 >= 10.30" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        PCRE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre2-8 >= 10.30" 2>&1`
        else
	        PCRE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre2-8 >= 10.30" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$PCRE2_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libpcre2-8 >= 10.30) were not met:

$PCRE2_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PCRE2_CFLAGS
and PCRE2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables PCRE2_CFLAGS
and PCRE2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	PCRE2_CFLAGS=$pkg_cv_PCRE2_CFLAGS
	PCRE2_LIBS=$pkg_cv_PCRE2_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


  for ac_i in $PCRE2_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $PCRE2_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ="$ -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

       ;; #(
  *) :
     ;;
esac
  done

  printf "%s\n" "#define PCRE2_CODE_UNIT_WIDTH 8" >>confdefs.h


  if test "x$PHP_PCRE_JIT" = xno
then :

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether external PCRE2 library has JIT supported" >&5
printf %s "checking whether external PCRE2 library has JIT supported... " >&6; }
if test ${php_cv_have_pcre2_jit+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
        CFLAGS_SAVE=$CFLAGS
        LIBS_SAVE=$LIBS
        CFLAGS="$CFLAGS $PCRE2_CFLAGS"
        LIBS="$LIBS $PCRE2_LIBS"
        if test "$cross_compiling" = yes
then :
  case $host_cpu in #(
  arm*|i[34567]86|x86_64|mips*|powerpc*|sparc) :
    php_cv_have_pcre2_jit=yes ;; #(
  *) :
    php_cv_have_pcre2_jit=no ;;
esac
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

          #include <pcre2.h>
          #include <stdlib.h>
          int main(void) {
            uint32_t have_jit;
            pcre2_config_8(PCRE2_CONFIG_JIT, &have_jit);
            return !have_jit;
          }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_have_pcre2_jit=yes
else case e in #(
  e) php_cv_have_pcre2_jit=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

        CFLAGS=$CFLAGS_SAVE
        LIBS=$LIBS_SAVE
       ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_pcre2_jit" >&5
printf "%s\n" "$php_cv_have_pcre2_jit" >&6; }
    if test "x$php_cv_have_pcre2_jit" = xyes
then :
  printf "%s\n" "#define HAVE_PCRE_JIT_SUPPORT 1" >>confdefs.h

fi
   ;;
esac
fi


  ext_builddir=ext/pcre
  ext_srcdir=$abs_srcdir/ext/pcre
  ext_dir=ext/pcre

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_PCRE_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_pcre.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pcre;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pcre;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_PCRE_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_pcre.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pcre="$shared_objects_pcre $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pcre.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pcre.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pcre"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pcre.$suffix: $ext_builddir/pcre.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pcre.$suffix \$(phplibdir)

$ext_builddir/pcre.$suffix: \$(shared_objects_pcre) \$(PCRE_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pcre) \$(PCRE_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PCRE 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_PCRE_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_pcre.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pcre;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_pcre.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pcre;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pcre

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/pcre
    for header_file in php_pcre.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done


else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCRE library to use" >&5
printf %s "checking for PCRE library to use... " >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
printf "%s\n" "bundled" >&6; }
  pcrelib_sources=" pcre2lib/pcre2_auto_possess.c pcre2lib/pcre2_chartables.c pcre2lib/pcre2_chkdint.c pcre2lib/pcre2_compile.c pcre2lib/pcre2_config.c pcre2lib/pcre2_context.c pcre2lib/pcre2_convert.c pcre2lib/pcre2_dfa_match.c pcre2lib/pcre2_error.c pcre2lib/pcre2_extuni.c pcre2lib/pcre2_find_bracket.c pcre2lib/pcre2_jit_compile.c pcre2lib/pcre2_maketables.c pcre2lib/pcre2_match_data.c pcre2lib/pcre2_match.c pcre2lib/pcre2_newline.c pcre2lib/pcre2_ord2utf.c pcre2lib/pcre2_pattern_info.c pcre2lib/pcre2_script_run.c pcre2lib/pcre2_serialize.c pcre2lib/pcre2_string_utils.c pcre2lib/pcre2_study.c pcre2lib/pcre2_substitute.c pcre2lib/pcre2_substring.c pcre2lib/pcre2_tables.c pcre2lib/pcre2_ucd.c pcre2lib/pcre2_valid_utf.c pcre2lib/pcre2_xclass.c "

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wno-implicit-fallthrough" >&5
printf %s "checking whether the C compiler accepts -Wno-implicit-fallthrough... " >&6; }
if test ${ax_cv_check_cflags___Wno_implicit_fallthrough+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wno-implicit-fallthrough $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wno_implicit_fallthrough=yes
else case e in #(
  e) ax_cv_check_cflags___Wno_implicit_fallthrough=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_implicit_fallthrough" >&5
printf "%s\n" "$ax_cv_check_cflags___Wno_implicit_fallthrough" >&6; }
if test "x$ax_cv_check_cflags___Wno_implicit_fallthrough" = xyes
then :
  PHP_PCRE_CFLAGS="$PHP_PCRE_CFLAGS -Wno-implicit-fallthrough"
else case e in #(
  e) : ;;
esac
fi


  PHP_PCRE_CFLAGS=" $PHP_PCRE_CFLAGS -DHAVE_CONFIG_H -DHAVE_MEMMOVE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I@ext_srcdir@/pcre2lib "


printf "%s\n" "#define HAVE_BUNDLED_PCRE 1" >>confdefs.h

  printf "%s\n" "#define PCRE2_CODE_UNIT_WIDTH 8" >>confdefs.h


  if test "x$PHP_PCRE_JIT" = xno
then :

else case e in #(
  e) printf "%s\n" "#define HAVE_PCRE_JIT_SUPPORT 1" >>confdefs.h

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Intel CET is enabled" >&5
printf %s "checking whether Intel CET is enabled... " >&6; }
if test ${php_cv_have_pcre2_intel_cet+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

          #ifndef __CET__
          # error CET is not enabled
          #endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_pcre2_intel_cet=yes
else case e in #(
  e) php_cv_have_pcre2_intel_cet=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_pcre2_intel_cet" >&5
printf "%s\n" "$php_cv_have_pcre2_intel_cet" >&6; }
    if test "x$php_cv_have_pcre2_intel_cet" = xyes
then :
  PHP_PCRE_CFLAGS="-mshstk $PHP_PCRE_CFLAGS"
fi
   ;;
esac
fi

    if test "x$PHP_VALGRIND" = xno
then :

else case e in #(
  e) if test "x$ZEND_DEBUG" = xyes
then :

printf "%s\n" "#define HAVE_PCRE_VALGRIND_SUPPORT 1" >>confdefs.h

fi ;;
esac
fi


  ext_builddir=ext/pcre
  ext_srcdir=$abs_srcdir/ext/pcre
  ext_dir=ext/pcre

  ac_extra=$(echo "$PHP_PCRE_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_PCRE_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $pcrelib_sources php_pcre.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pcre;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pcre;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_PCRE_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in $pcrelib_sources php_pcre.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pcre="$shared_objects_pcre $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pcre.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pcre.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pcre"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pcre.$suffix: $ext_builddir/pcre.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pcre.$suffix \$(phplibdir)

$ext_builddir/pcre.$suffix: \$(shared_objects_pcre) \$(PCRE_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pcre) \$(PCRE_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PCRE 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_PCRE_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $pcrelib_sources php_pcre.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pcre;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $pcrelib_sources php_pcre.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pcre;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pcre

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

  as_fn_append BUILD_DIR " $ext_builddir/pcre2lib"


    header_path=ext/pcre
    for header_file in php_pcre.h pcre2lib/; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done


fi





php_with_sqlite3=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the SQLite3 extension" >&5
printf %s "checking whether to enable the SQLite3 extension... " >&6; }

# Check whether --with-sqlite3 was given.
if test ${with_sqlite3+y}
then :
  withval=$with_sqlite3; PHP_SQLITE3=$withval
else case e in #(
  e)
  PHP_SQLITE3=yes
  test "$PHP_ENABLE_ALL" && PHP_SQLITE3=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SQLITE3 in
shared,*)
  PHP_SQLITE3=$(echo "$PHP_SQLITE3"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SQLITE3=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test $PHP_SQLITE3 != "no"; then


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3 >= 3.7.17" >&5
printf %s "checking for sqlite3 >= 3.7.17... " >&6; }

if test -n "$SQLITE_CFLAGS"; then
    pkg_cv_SQLITE_CFLAGS="$SQLITE_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3 >= 3.7.17\""; } >&5
  ($PKG_CONFIG --exists --print-errors "sqlite3 >= 3.7.17") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SQLITE_CFLAGS=`$PKG_CONFIG --cflags "sqlite3 >= 3.7.17" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$SQLITE_LIBS"; then
    pkg_cv_SQLITE_LIBS="$SQLITE_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3 >= 3.7.17\""; } >&5
  ($PKG_CONFIG --exists --print-errors "sqlite3 >= 3.7.17") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SQLITE_LIBS=`$PKG_CONFIG --libs "sqlite3 >= 3.7.17" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        SQLITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sqlite3 >= 3.7.17" 2>&1`
        else
	        SQLITE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sqlite3 >= 3.7.17" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$SQLITE_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (sqlite3 >= 3.7.17) were not met:

$SQLITE_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SQLITE_CFLAGS
and SQLITE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables SQLITE_CFLAGS
and SQLITE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	SQLITE_CFLAGS=$pkg_cv_SQLITE_CFLAGS
	SQLITE_LIBS=$pkg_cv_SQLITE_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }


  for ac_i in $SQLITE_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $SQLITE_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  SQLITE3_SHARED_LIBADD="$SQLITE3_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        SQLITE3_SHARED_LIBADD="$SQLITE3_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        SQLITE3_SHARED_LIBADD="-L$ai_p $SQLITE3_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && SQLITE3_SHARED_LIBADD="$ld_runpath_switch$ai_p $SQLITE3_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


fi


printf "%s\n" "#define HAVE_SQLITE3 1" >>confdefs.h



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$SQLITE3_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_errstr in -lsqlite3" >&5
printf %s "checking for sqlite3_errstr in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_errstr+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_errstr (void);
int
main (void)
{
return sqlite3_errstr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sqlite3_sqlite3_errstr=yes
else case e in #(
  e) ac_cv_lib_sqlite3_sqlite3_errstr=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_errstr" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_errstr" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_errstr" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_SQLITE3_ERRSTR 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_sqlite3_sqlite3_errstr

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$SQLITE3_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_expanded_sql in -lsqlite3" >&5
printf %s "checking for sqlite3_expanded_sql in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_expanded_sql+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_expanded_sql (void);
int
main (void)
{
return sqlite3_expanded_sql ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sqlite3_sqlite3_expanded_sql=yes
else case e in #(
  e) ac_cv_lib_sqlite3_sqlite3_expanded_sql=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_expanded_sql" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_expanded_sql" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_expanded_sql" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_SQLITE3_EXPANDED_SQL 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_sqlite3_sqlite3_expanded_sql

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$SQLITE3_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_load_extension in -lsqlite3" >&5
printf %s "checking for sqlite3_load_extension in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_load_extension+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_load_extension (void);
int
main (void)
{
return sqlite3_load_extension ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sqlite3_sqlite3_load_extension=yes
else case e in #(
  e) ac_cv_lib_sqlite3_sqlite3_load_extension=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_load_extension" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_load_extension" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_sqlite3_sqlite3_load_extension

printf "%s\n" "#define SQLITE_OMIT_LOAD_EXTENSION 1" >>confdefs.h

   ;;
esac
fi



  ext_builddir=ext/sqlite3
  ext_srcdir=$abs_srcdir/ext/sqlite3
  ext_dir=ext/sqlite3

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SQLITE3_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sqlite3.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC sqlite3;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC sqlite3;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SQLITE3_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in sqlite3.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_sqlite3="$shared_objects_sqlite3 $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sqlite3.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sqlite3.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sqlite3"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/sqlite3.$suffix: $ext_builddir/sqlite3.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/sqlite3.$suffix \$(phplibdir)

$ext_builddir/sqlite3.$suffix: \$(shared_objects_sqlite3) \$(SQLITE3_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_sqlite3) \$(SQLITE3_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SQLITE3 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SQLITE3_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sqlite3.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC sqlite3;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sqlite3.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC sqlite3;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=sqlite3

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE3_SHARED_LIBADD"

fi





php_with_zlib=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ZLIB support" >&5
printf %s "checking for ZLIB support... " >&6; }

# Check whether --with-zlib was given.
if test ${with_zlib+y}
then :
  withval=$with_zlib; PHP_ZLIB=$withval
else case e in #(
  e)
  PHP_ZLIB=no
  test "$PHP_ENABLE_ALL" && PHP_ZLIB=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_ZLIB in
shared,*)
  PHP_ZLIB=$(echo "$PHP_ZLIB"|$SED 's/^shared,//')
  ;;
shared)
  PHP_ZLIB=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_ZLIB" != "no"; then

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.11" >&5
printf %s "checking for zlib >= 1.2.11... " >&6; }

if test -n "$ZLIB_CFLAGS"; then
    pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
  ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.11" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ZLIB_LIBS"; then
    pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
  ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.11" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
        else
	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ZLIB_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (zlib >= 1.2.11) were not met:

$ZLIB_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ZLIB_CFLAGS
and ZLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ZLIB_CFLAGS
and ZLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
	ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

  for ac_i in $ZLIB_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $ZLIB_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ZLIB_SHARED_LIBADD="$ZLIB_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        ZLIB_SHARED_LIBADD="$ZLIB_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        ZLIB_SHARED_LIBADD="-L$ai_p $ZLIB_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && ZLIB_SHARED_LIBADD="$ld_runpath_switch$ai_p $ZLIB_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


printf "%s\n" "#define HAVE_ZLIB 1" >>confdefs.h


  ext_builddir=ext/zlib
  ext_srcdir=$abs_srcdir/ext/zlib
  ext_dir=ext/zlib

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_ZLIB_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in zlib.c zlib_fopen_wrapper.c zlib_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC zlib;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC zlib;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_ZLIB_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in zlib.c zlib_fopen_wrapper.c zlib_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_zlib="$shared_objects_zlib $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/zlib.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/zlib.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_zlib"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/zlib.$suffix: $ext_builddir/zlib.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/zlib.$suffix \$(phplibdir)

$ext_builddir/zlib.$suffix: \$(shared_objects_zlib) \$(ZLIB_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_zlib) \$(ZLIB_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_ZLIB 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_ZLIB_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in zlib.c zlib_fopen_wrapper.c zlib_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC zlib;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in zlib.c zlib_fopen_wrapper.c zlib_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC zlib;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=zlib

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST ZLIB_SHARED_LIBADD"

fi
fi





php_enable_bcmath=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable bc style precision math functions" >&5
printf %s "checking whether to enable bc style precision math functions... " >&6; }
# Check whether --enable-bcmath was given.
if test ${enable_bcmath+y}
then :
  enableval=$enable_bcmath; PHP_BCMATH=$enableval
else case e in #(
  e)
  PHP_BCMATH=no
  test "$PHP_ENABLE_ALL" && PHP_BCMATH=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_BCMATH in
shared,*)
  PHP_BCMATH=$(echo "$PHP_BCMATH"|$SED 's/^shared,//')
  ;;
shared)
  PHP_BCMATH=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_BCMATH" != "no"; then

  ext_builddir=ext/bcmath
  ext_srcdir=$abs_srcdir/ext/bcmath
  ext_dir=ext/bcmath

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_BCMATH_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in bcmath.c libbcmath/src/add.c libbcmath/src/compare.c libbcmath/src/convert.c libbcmath/src/div.c libbcmath/src/divmod.c libbcmath/src/doaddsub.c libbcmath/src/floor_or_ceil.c libbcmath/src/long2num.c libbcmath/src/init.c libbcmath/src/int2num.c libbcmath/src/nearzero.c libbcmath/src/neg.c libbcmath/src/num2long.c libbcmath/src/num2str.c libbcmath/src/raise.c libbcmath/src/raisemod.c libbcmath/src/recmul.c libbcmath/src/rmzero.c libbcmath/src/round.c libbcmath/src/sqrt.c libbcmath/src/str2num.c libbcmath/src/sub.c libbcmath/src/zero.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC bcmath;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC bcmath;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_BCMATH_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in bcmath.c libbcmath/src/add.c libbcmath/src/compare.c libbcmath/src/convert.c libbcmath/src/div.c libbcmath/src/divmod.c libbcmath/src/doaddsub.c libbcmath/src/floor_or_ceil.c libbcmath/src/long2num.c libbcmath/src/init.c libbcmath/src/int2num.c libbcmath/src/nearzero.c libbcmath/src/neg.c libbcmath/src/num2long.c libbcmath/src/num2str.c libbcmath/src/raise.c libbcmath/src/raisemod.c libbcmath/src/recmul.c libbcmath/src/rmzero.c libbcmath/src/round.c libbcmath/src/sqrt.c libbcmath/src/str2num.c libbcmath/src/sub.c libbcmath/src/zero.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_bcmath="$shared_objects_bcmath $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/bcmath.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/bcmath.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bcmath"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/bcmath.$suffix: $ext_builddir/bcmath.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/bcmath.$suffix \$(phplibdir)

$ext_builddir/bcmath.$suffix: \$(shared_objects_bcmath) \$(BCMATH_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_bcmath) \$(BCMATH_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_BCMATH 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_BCMATH_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in bcmath.c libbcmath/src/add.c libbcmath/src/compare.c libbcmath/src/convert.c libbcmath/src/div.c libbcmath/src/divmod.c libbcmath/src/doaddsub.c libbcmath/src/floor_or_ceil.c libbcmath/src/long2num.c libbcmath/src/init.c libbcmath/src/int2num.c libbcmath/src/nearzero.c libbcmath/src/neg.c libbcmath/src/num2long.c libbcmath/src/num2str.c libbcmath/src/raise.c libbcmath/src/raisemod.c libbcmath/src/recmul.c libbcmath/src/rmzero.c libbcmath/src/round.c libbcmath/src/sqrt.c libbcmath/src/str2num.c libbcmath/src/sub.c libbcmath/src/zero.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC bcmath;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in bcmath.c libbcmath/src/add.c libbcmath/src/compare.c libbcmath/src/convert.c libbcmath/src/div.c libbcmath/src/divmod.c libbcmath/src/doaddsub.c libbcmath/src/floor_or_ceil.c libbcmath/src/long2num.c libbcmath/src/init.c libbcmath/src/int2num.c libbcmath/src/nearzero.c libbcmath/src/neg.c libbcmath/src/num2long.c libbcmath/src/num2str.c libbcmath/src/raise.c libbcmath/src/raisemod.c libbcmath/src/recmul.c libbcmath/src/rmzero.c libbcmath/src/round.c libbcmath/src/sqrt.c libbcmath/src/str2num.c libbcmath/src/sub.c libbcmath/src/zero.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC bcmath;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=bcmath

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

  as_fn_append BUILD_DIR " $ext_builddir/libbcmath/src"


printf "%s\n" "#define HAVE_BCMATH 1" >>confdefs.h

fi





php_with_bz2=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BZip2 support" >&5
printf %s "checking for BZip2 support... " >&6; }

# Check whether --with-bz2 was given.
if test ${with_bz2+y}
then :
  withval=$with_bz2; PHP_BZ2=$withval
else case e in #(
  e)
  PHP_BZ2=no
  test "$PHP_ENABLE_ALL" && PHP_BZ2=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_BZ2 in
shared,*)
  PHP_BZ2=$(echo "$PHP_BZ2"|$SED 's/^shared,//')
  ;;
shared)
  PHP_BZ2=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_BZ2" != "no"; then
  if test -r $PHP_BZ2/include/bzlib.h
then :
  BZIP_DIR=$PHP_BZ2
else case e in #(
  e)
    for i in /usr/local /usr; do
      if test -r $i/include/bzlib.h
then :
  BZIP_DIR=$i; break;
fi
    done
   ;;
esac
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BZip2" >&5
printf %s "checking for BZip2... " >&6; }
  if ${BZIP_DIR:+false} :
then :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: bzlib.h not found" >&5
printf "%s\n" "bzlib.h not found" >&6; }
    as_fn_error $? "Please reinstall the BZip2 library package" "$LINENO" 5

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $BZIP_DIR" >&5
printf "%s\n" "found in $BZIP_DIR" >&6; } ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$BZIP_DIR/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzerror in -lbz2" >&5
printf %s "checking for BZ2_bzerror in -lbz2... " >&6; }
if test ${ac_cv_lib_bz2_BZ2_bzerror+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lbz2  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char BZ2_bzerror (void);
int
main (void)
{
return BZ2_bzerror ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_bz2_BZ2_bzerror=yes
else case e in #(
  e) ac_cv_lib_bz2_BZ2_bzerror=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzerror" >&5
printf "%s\n" "$ac_cv_lib_bz2_BZ2_bzerror" >&6; }
if test "x$ac_cv_lib_bz2_BZ2_bzerror" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


for include_path in $BZIP_DIR/include; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done



  if test "$ext_shared" = "yes"; then
    BZ2_SHARED_LIBADD="-lbz2 $BZ2_SHARED_LIBADD"
    if test -n "$BZIP_DIR/$PHP_LIBDIR"; then

  if test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$BZIP_DIR/$PHP_LIBDIR" || echo "$BZIP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$BZIP_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $BZIP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$BZIP_DIR/$PHP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        BZ2_SHARED_LIBADD="-L$ai_p $BZ2_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && BZ2_SHARED_LIBADD="$ld_runpath_switch$ai_p $BZ2_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$BZIP_DIR/$PHP_LIBDIR"; then

  if test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$BZIP_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$BZIP_DIR/$PHP_LIBDIR" || echo "$BZIP_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$BZIP_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $BZIP_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$BZIP_DIR/$PHP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case bz2 in
  c|c_r) ;;
  *)
      LIBS="-lbz2 $LIBS"
   ;;
  esac




  fi



printf "%s\n" "#define HAVE_BZ2 1" >>confdefs.h



else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_bz2_BZ2_bzerror
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The bz2 extension requires libbz2 >= 1.0.0
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi



  ext_builddir=ext/bz2
  ext_srcdir=$abs_srcdir/ext/bz2
  ext_dir=ext/bz2

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_BZ2_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in bz2.c bz2_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC bz2;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC bz2;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_BZ2_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in bz2.c bz2_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_bz2="$shared_objects_bz2 $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/bz2.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/bz2.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_bz2"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/bz2.$suffix: $ext_builddir/bz2.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/bz2.$suffix \$(phplibdir)

$ext_builddir/bz2.$suffix: \$(shared_objects_bz2) \$(BZ2_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_bz2) \$(BZ2_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_BZ2 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_BZ2_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in bz2.c bz2_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC bz2;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in bz2.c bz2_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC bz2;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=bz2

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST BZ2_SHARED_LIBADD"

fi





php_enable_calendar=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable calendar conversion support" >&5
printf %s "checking whether to enable calendar conversion support... " >&6; }
# Check whether --enable-calendar was given.
if test ${enable_calendar+y}
then :
  enableval=$enable_calendar; PHP_CALENDAR=$enableval
else case e in #(
  e)
  PHP_CALENDAR=no
  test "$PHP_ENABLE_ALL" && PHP_CALENDAR=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_CALENDAR in
shared,*)
  PHP_CALENDAR=$(echo "$PHP_CALENDAR"|$SED 's/^shared,//')
  ;;
shared)
  PHP_CALENDAR=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_CALENDAR" = "yes"; then

printf "%s\n" "#define HAVE_CALENDAR 1" >>confdefs.h


  ext_builddir=ext/calendar
  ext_srcdir=$abs_srcdir/ext/calendar
  ext_dir=ext/calendar

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_CALENDAR_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC calendar;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC calendar;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_CALENDAR_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_calendar="$shared_objects_calendar $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/calendar.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/calendar.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_calendar"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/calendar.$suffix: $ext_builddir/calendar.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/calendar.$suffix \$(phplibdir)

$ext_builddir/calendar.$suffix: \$(shared_objects_calendar) \$(CALENDAR_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_calendar) \$(CALENDAR_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_CALENDAR 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_CALENDAR_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC calendar;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC calendar;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=calendar

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

fi





php_enable_ctype=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable ctype functions" >&5
printf %s "checking whether to enable ctype functions... " >&6; }
# Check whether --enable-ctype was given.
if test ${enable_ctype+y}
then :
  enableval=$enable_ctype; PHP_CTYPE=$enableval
else case e in #(
  e)
  PHP_CTYPE=yes
  test "$PHP_ENABLE_ALL" && PHP_CTYPE=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_CTYPE in
shared,*)
  PHP_CTYPE=$(echo "$PHP_CTYPE"|$SED 's/^shared,//')
  ;;
shared)
  PHP_CTYPE=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_CTYPE" != "no"; then

printf "%s\n" "#define HAVE_CTYPE 1" >>confdefs.h


  ext_builddir=ext/ctype
  ext_srcdir=$abs_srcdir/ext/ctype
  ext_dir=ext/ctype

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_CTYPE_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ctype.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC ctype;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC ctype;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_CTYPE_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in ctype.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_ctype="$shared_objects_ctype $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/ctype.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/ctype.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_ctype"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/ctype.$suffix: $ext_builddir/ctype.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/ctype.$suffix \$(phplibdir)

$ext_builddir/ctype.$suffix: \$(shared_objects_ctype) \$(CTYPE_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_ctype) \$(CTYPE_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_CTYPE 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_CTYPE_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ctype.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC ctype;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ctype.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC ctype;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=ctype

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

fi





php_with_curl=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cURL support" >&5
printf %s "checking for cURL support... " >&6; }

# Check whether --with-curl was given.
if test ${with_curl+y}
then :
  withval=$with_curl; PHP_CURL=$withval
else case e in #(
  e)
  PHP_CURL=no
  test "$PHP_ENABLE_ALL" && PHP_CURL=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_CURL in
shared,*)
  PHP_CURL=$(echo "$PHP_CURL"|$SED 's/^shared,//')
  ;;
shared)
  PHP_CURL=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_CURL" != "no"; then

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcurl >= 7.61.0" >&5
printf %s "checking for libcurl >= 7.61.0... " >&6; }

if test -n "$CURL_CFLAGS"; then
    pkg_cv_CURL_CFLAGS="$CURL_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.61.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libcurl >= 7.61.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl >= 7.61.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$CURL_LIBS"; then
    pkg_cv_CURL_LIBS="$CURL_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.61.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libcurl >= 7.61.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.61.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl >= 7.61.0" 2>&1`
        else
	        CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl >= 7.61.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$CURL_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libcurl >= 7.61.0) were not met:

$CURL_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CURL_CFLAGS
and CURL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables CURL_CFLAGS
and CURL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	CURL_CFLAGS=$pkg_cv_CURL_CFLAGS
	CURL_LIBS=$pkg_cv_CURL_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

if test -n "$CURL_FEATURES"; then
    pkg_cv_CURL_FEATURES="$CURL_FEATURES"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CURL_FEATURES=`$PKG_CONFIG --variable="supported_features" "libcurl" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
CURL_FEATURES=$pkg_cv_CURL_FEATURES

if test "x$CURL_FEATURES" = x""
then :

fi


  for ac_i in $CURL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  CURL_SHARED_LIBADD="$CURL_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        CURL_SHARED_LIBADD="$CURL_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        CURL_SHARED_LIBADD="-L$ai_p $CURL_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && CURL_SHARED_LIBADD="$ld_runpath_switch$ai_p $CURL_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $CURL_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL support in libcurl" >&5
printf %s "checking for SSL support in libcurl... " >&6; }
  case $CURL_FEATURES in #(
  *SSL*) :
    CURL_SSL=yes ;; #(
  *) :
    CURL_SSL=no ;;
esac
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CURL_SSL" >&5
printf "%s\n" "$CURL_SSL" >&6; }

  if test "x$PHP_THREAD_SAFETY" = xyes && test "x$CURL_SSL" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libcurl is linked against a supported OpenSSL version" >&5
printf %s "checking whether libcurl is linked against a supported OpenSSL version... " >&6; }
if test ${php_cv_lib_curl_ssl_supported+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
      save_LIBS=$LIBS
      save_CFLAGS=$CFLAGS
      LIBS="$LIBS $CURL_SHARED_LIBADD"
      CFLAGS="$CFLAGS $CURL_CFLAGS"

      if test "$cross_compiling" = yes
then :
  php_cv_lib_curl_ssl_supported=yes
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <strings.h>
#include <curl/curl.h>

int
main (void)
{

  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);

  if (data && data->ssl_version && *data->ssl_version) {
    const char *ptr = data->ssl_version;

    while(*ptr == ' ') ++ptr;
    int major, minor;
    if (sscanf(ptr, "OpenSSL/%d.%d", &major, &minor) == 2) {
      /* Check for 1.1.1+ (including 1.1.1a, 1.1.1b, etc.) */
      if ((major > 1) || (major == 1 && minor == 1 && strncmp(ptr + 12, "1", 1) == 0)) {
        /* OpenSSL 1.1.1+ - supported */
        return 3;
      }
      /* OpenSSL 1.1.0 and earlier - unsupported */
      return 0;
    }
    if (strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1) == 0) {
      /* Old OpenSSL version */
      return 0;
    }
    /* Different SSL library */
    return 2;
  }
  /* No SSL support */
  return 1;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_lib_curl_ssl_supported=no
else case e in #(
  e) php_cv_lib_curl_ssl_supported=yes ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

      LIBS=$save_LIBS
      CFLAGS=$save_CFLAGS
     ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_curl_ssl_supported" >&5
printf "%s\n" "$php_cv_lib_curl_ssl_supported" >&6; }

    if test "x$php_cv_lib_curl_ssl_supported" = xno
then :

      as_fn_error $? "libcurl is linked against an unsupported OpenSSL version. OpenSSL 1.1.1 or later is required." "$LINENO" 5

fi

fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$CURL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_easy_perform in -lcurl" >&5
printf %s "checking for curl_easy_perform in -lcurl... " >&6; }
if test ${ac_cv_lib_curl_curl_easy_perform+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurl  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char curl_easy_perform (void);
int
main (void)
{
return curl_easy_perform ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_curl_curl_easy_perform=yes
else case e in #(
  e) ac_cv_lib_curl_curl_easy_perform=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_perform" >&5
printf "%s\n" "$ac_cv_lib_curl_curl_easy_perform" >&6; }
if test "x$ac_cv_lib_curl_curl_easy_perform" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_CURL 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_curl_curl_easy_perform
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The libcurl check failed.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi



  ext_builddir=ext/curl
  ext_srcdir=$abs_srcdir/ext/curl
  ext_dir=ext/curl

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_CURL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in interface.c multi.c share.c curl_file.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC curl;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC curl;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_CURL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in interface.c multi.c share.c curl_file.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_curl="$shared_objects_curl $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/curl.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/curl.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_curl"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/curl.$suffix: $ext_builddir/curl.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/curl.$suffix \$(phplibdir)

$ext_builddir/curl.$suffix: \$(shared_objects_curl) \$(CURL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_curl) \$(CURL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_CURL 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_CURL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in interface.c multi.c share.c curl_file.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC curl;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in interface.c multi.c share.c curl_file.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC curl;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=curl

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/curl
    for header_file in php_curl.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



  PHP_VAR_SUBST="$PHP_VAR_SUBST CURL_SHARED_LIBADD"

fi


















php_enable_dba=no


# Check whether --enable-dba was given.
if test ${enable_dba+y}
then :
  enableval=$enable_dba; PHP_DBA=$enableval
else case e in #(
  e)
  PHP_DBA=no
  test "$PHP_ENABLE_ALL" && PHP_DBA=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_DBA in
shared,*)
  PHP_DBA=$(echo "$PHP_DBA"|$SED 's/^shared,//')
  ;;
shared)
  PHP_DBA=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac









php_with_qdbm=no



# Check whether --with-qdbm was given.
if test ${with_qdbm+y}
then :
  withval=$with_qdbm; PHP_QDBM=$withval
else case e in #(
  e)
  PHP_QDBM=no

 ;;
esac
fi


ext_output=$PHP_QDBM






php_with_gdbm=no



# Check whether --with-gdbm was given.
if test ${with_gdbm+y}
then :
  withval=$with_gdbm; PHP_GDBM=$withval
else case e in #(
  e)
  PHP_GDBM=no

 ;;
esac
fi


ext_output=$PHP_GDBM






php_with_ndbm=no



# Check whether --with-ndbm was given.
if test ${with_ndbm+y}
then :
  withval=$with_ndbm; PHP_NDBM=$withval
else case e in #(
  e)
  PHP_NDBM=no

 ;;
esac
fi


ext_output=$PHP_NDBM






php_with_db4=no



# Check whether --with-db4 was given.
if test ${with_db4+y}
then :
  withval=$with_db4; PHP_DB4=$withval
else case e in #(
  e)
  PHP_DB4=no

 ;;
esac
fi


ext_output=$PHP_DB4






php_with_db3=no



# Check whether --with-db3 was given.
if test ${with_db3+y}
then :
  withval=$with_db3; PHP_DB3=$withval
else case e in #(
  e)
  PHP_DB3=no

 ;;
esac
fi


ext_output=$PHP_DB3






php_with_db2=no



# Check whether --with-db2 was given.
if test ${with_db2+y}
then :
  withval=$with_db2; PHP_DB2=$withval
else case e in #(
  e)
  PHP_DB2=no

 ;;
esac
fi


ext_output=$PHP_DB2






php_with_db1=no



# Check whether --with-db1 was given.
if test ${with_db1+y}
then :
  withval=$with_db1; PHP_DB1=$withval
else case e in #(
  e)
  PHP_DB1=no

 ;;
esac
fi


ext_output=$PHP_DB1






php_with_dbm=no



# Check whether --with-dbm was given.
if test ${with_dbm+y}
then :
  withval=$with_dbm; PHP_DBM=$withval
else case e in #(
  e)
  PHP_DBM=no

 ;;
esac
fi


ext_output=$PHP_DBM






php_with_tcadb=no



# Check whether --with-tcadb was given.
if test ${with_tcadb+y}
then :
  withval=$with_tcadb; PHP_TCADB=$withval
else case e in #(
  e)
  PHP_TCADB=no

 ;;
esac
fi


ext_output=$PHP_TCADB






php_with_lmdb=no



# Check whether --with-lmdb was given.
if test ${with_lmdb+y}
then :
  withval=$with_lmdb; PHP_LMDB=$withval
else case e in #(
  e)
  PHP_LMDB=no

 ;;
esac
fi


ext_output=$PHP_LMDB






if test "$PHP_QDBM" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  for i in $PHP_QDBM /usr/local /usr; do
    if test -f "$i/include/depot.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/depot.h
      break
    elif test -f "$i/include/qdbm/depot.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/qdbm/depot.h
      break
    fi
  done

  if test -n "$THIS_INCLUDE"; then
    for LIB in qdbm; do

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIB""_dpopen" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dpopen in -l$LIB" >&5
printf %s "checking for dpopen in -l$LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dpopen (void);
int
main (void)
{
return dpopen ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


printf "%s\n" "#define QDBM_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h


printf "%s\n" "#define DBA_QDBM 1" >>confdefs.h

        THIS_LIBS=$LIB


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$LIB_dpopen

   ;;
esac
fi

      if test -n "$THIS_LIBS"; then
        break
      fi
    done
  fi


  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi


  THIS_RESULT=yes
  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX

fi

  THIS_NAME=QDBM
  if test -n ""; then
    THIS_FULL_NAME=""
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_GDBM" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  if test "x$HAVE_QDBM" = x1
then :

  THIS_NAME=GDBM
  if test -n "gdbm"; then
    THIS_FULL_NAME="gdbm"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n "You cannot combine --with-gdbm with --with-qdbm"; then
    as_fn_error $? "You cannot combine --with-gdbm with --with-qdbm" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME

fi
  for i in $PHP_GDBM /usr/local /usr; do
    if test -f "$i/include/gdbm.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/gdbm.h
      break
    fi
  done

  if test -n "$THIS_INCLUDE"; then

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
printf %s "checking for gdbm_open in -lgdbm... " >&6; }
if test ${ac_cv_lib_gdbm_gdbm_open+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lgdbm  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char gdbm_open (void);
int
main (void)
{
return gdbm_open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gdbm_gdbm_open=yes
else case e in #(
  e) ac_cv_lib_gdbm_gdbm_open=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
printf "%s\n" "$ac_cv_lib_gdbm_gdbm_open" >&6; }
if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


printf "%s\n" "#define GDBM_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h


printf "%s\n" "#define DBA_GDBM 1" >>confdefs.h

      THIS_LIBS=gdbm


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_gdbm_gdbm_open

   ;;
esac
fi

  fi


  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi


  THIS_RESULT=yes
  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX

fi

  THIS_NAME=GDBM
  if test -n ""; then
    THIS_FULL_NAME=""
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_NDBM" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  for i in $PHP_NDBM /usr/local /usr; do
    if test -f "$i/include/ndbm.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/ndbm.h
      break
    elif test -f "$i/include/db1/ndbm.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db1/ndbm.h
      break
    fi
  done

  if test -n "$THIS_INCLUDE"; then
    for LIB in ndbm db1 c; do

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIB""_dbm_open" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -l$LIB" >&5
printf %s "checking for dbm_open in -l$LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dbm_open (void);
int
main (void)
{
return dbm_open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


printf "%s\n" "#define NDBM_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h


printf "%s\n" "#define DBA_NDBM 1" >>confdefs.h

        THIS_LIBS=$LIB


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$LIB_dbm_open

   ;;
esac
fi

      if test -n "$THIS_LIBS"; then
        break
      fi
    done
  fi


  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi


  THIS_RESULT=yes
  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX

fi

  THIS_NAME=NDBM
  if test -n ""; then
    THIS_FULL_NAME=""
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_TCADB" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  for i in $PHP_TCADB /usr/local /usr; do
  if test -f "$i/include/tcadb.h"; then
    THIS_PREFIX=$i

for include_path in $THIS_PREFIX/include; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    THIS_INCLUDE=$i/include/tcadb.h
    break
  fi
  done

  if test -n "$THIS_INCLUDE"; then
    for LIB in tokyocabinet; do

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIB""_tcadbopen" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tcadbopen in -l$LIB" >&5
printf %s "checking for tcadbopen in -l$LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char tcadbopen (void);
int
main (void)
{
return tcadbopen ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


printf "%s\n" "#define TCADB_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h


printf "%s\n" "#define DBA_TCADB 1" >>confdefs.h

        THIS_LIBS=$LIB


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$LIB_tcadbopen

   ;;
esac
fi

      if test -n "$THIS_LIBS"; then
        break
      fi
    done
  fi


  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi


  THIS_RESULT=yes
  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX

fi

  THIS_NAME=TCADB
  if test -n ""; then
    THIS_FULL_NAME=""
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_LMDB" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  for i in $PHP_LMDB /usr/local /usr; do
    if test -f "$i/include/lmdb.h"; then
      THIS_PREFIX=$i

for include_path in $THIS_PREFIX/include; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

      THIS_INCLUDE=$i/include/lmdb.h
      break
    fi
  done

  if test -n "$THIS_INCLUDE"; then
    for LIB in lmdb; do

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIB""_mdb_env_open" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mdb_env_open in -l$LIB" >&5
printf %s "checking for mdb_env_open in -l$LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char mdb_env_open (void);
int
main (void)
{
return mdb_env_open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


printf "%s\n" "#define LMDB_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h


printf "%s\n" "#define DBA_LMDB 1" >>confdefs.h

        THIS_LIBS=$LIB


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$LIB_mdb_env_open

   ;;
esac
fi

      if test -n "$THIS_LIBS"; then
        break
      fi
    done
  fi


  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi


  THIS_RESULT=yes
  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX

fi

  THIS_NAME=LMDB
  if test -n ""; then
    THIS_FULL_NAME=""
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME




if test "$PHP_DB4" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  dbdp4="/usr/local/BerkeleyDB.4."
  dbdp5="/usr/local/BerkeleyDB.5."
  for i in \
    $PHP_DB4 \
    ${dbdp5}1 \
    ${dbdp5}0 \
    ${dbdp4}8 \
    ${dbdp4}7 \
    ${dbdp4}6 \
    ${dbdp4}5 \
    ${dbdp4}4 \
    ${dbdp4}3 \
    ${dbdp4}2 \
    ${dbdp4}1 \
    ${dbdp4}0 \
    /usr/local \
    /usr \
  ; do
    if test -f "$i/db5/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/db5/db.h
      break
    elif test -f "$i/db4/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/db4/db.h
      break
    elif test -f "$i/include/db5.3/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db5.3/db.h
      break
    elif test -f "$i/include/db5.1/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db5.1/db.h
      break
    elif test -f "$i/include/db5.0/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db5.0/db.h
      break
    elif test -f "$i/include/db4.8/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db4.8/db.h
      break
    elif test -f "$i/include/db4.7/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db4.7/db.h
      break
    elif test -f "$i/include/db4.6/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db4.6/db.h
      break
    elif test -f "$i/include/db4.5/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db4.5/db.h
      break
    elif test -f "$i/include/db4/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db4/db.h
      break
    elif test -f "$i/include/db/db4.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db/db4.h
      break
    elif test -f "$i/include/db4.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db4.h
      break
    elif test -f "$i/include/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db.h
      break
    fi
  done

  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  for LIB in db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do
    if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
      lib_found="";

  old_LDFLAGS=$LDFLAGS
  LDFLAGS="-L$THIS_PREFIX/$PHP_LIBDIR $LDFLAGS"
  old_LIBS=$LIBS
  LIBS="-l$LIB $LIBS"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "$THIS_INCLUDE"
int
main (void)
{
(void)db_create((DB**)0, (DB_ENV*)0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR == 4 || (4 == 4 && DB_VERSION_MAJOR == 5)
            yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :

            THIS_LIBS=$LIB
            lib_found=1

fi
rm -rf conftest*

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  LDFLAGS=$old_LDFLAGS
  LIBS=$old_LIBS

      if test -n "$lib_found"; then
        lib_found="";
        break;
      fi
    fi
  done

  if ${THIS_LIBS:+false} :
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "DB4 major version check failed: header contains different version
See 'config.log' for more details" "$LINENO" 5; }
fi

  if test "4" = "4"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DB4 minor version and patch level" >&5
printf %s "checking for DB4 minor version and patch level... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR != 1) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1 && DB_VERSION_PATCH >= 25)
      yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
printf "%s\n" "ok" >&6; }
else case e in #(
  e) as_fn_error $? "Version 4.1 requires patch level 25" "$LINENO" 5 ;;
esac
fi
rm -rf conftest*

  fi
  if test "x$ext_shared" = xyes
then :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if dba can be used as shared extension" >&5
printf %s "checking if dba can be used as shared extension... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR > 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2)
      yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else case e in #(
  e) as_fn_error $? "At least version 3.3 is required" "$LINENO" 5 ;;
esac
fi
rm -rf conftest*


fi

  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi


printf "%s\n" "#define DBA_DB4 1" >>confdefs.h


  if ${THIS_INCLUDE:+false} :
then :

else case e in #(
  e)
printf "%s\n" "#define DB4_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h
 ;;
esac
fi

  THIS_RESULT=yes
  DB4_LIBS=$THIS_LIBS
  DB4_PREFIX=$THIS_PREFIX
  DB4_INCLUDE=$THIS_INCLUDE

  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX


fi

  THIS_NAME=DB4
  if test -n "Berkeley DB4"; then
    THIS_FULL_NAME="Berkeley DB4"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_DB3" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  if test "x$HAVE_DB4" = x1
then :

  THIS_NAME=DB3
  if test -n "Berkeley DB3"; then
    THIS_FULL_NAME="Berkeley DB3"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n "You cannot combine --with-db3 with --with-db4"; then
    as_fn_error $? "You cannot combine --with-db3 with --with-db4" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME

fi
  for i in \
    $PHP_DB3 \
    /usr/local/BerkeleyDB.3.3 \
    /usr/local/BerkeleyDB.3.2 \
    /usr/local/BerkeleyDB.3.1 \
    /usr/local/BerkeleyDB.3.0 \
    /usr/local \
    /usr \
  ; do
    if test -f "$i/db3/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db3/db.h
      break
    elif test -f "$i/include/db3/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db3/db.h
      break
    elif test -f "$i/include/db/db3.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db/db3.h
      break
    elif test -f "$i/include/db3.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db3.h
      break
    elif test -f "$i/include/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db.h
      break
    fi
  done

  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  for LIB in db-3.3 db-3.2 db-3.1 db-3.0 db-3 db3 db; do
    if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
      lib_found="";

  old_LDFLAGS=$LDFLAGS
  LDFLAGS="-L$THIS_PREFIX/$PHP_LIBDIR $LDFLAGS"
  old_LIBS=$LIBS
  LIBS="-l$LIB $LIBS"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "$THIS_INCLUDE"
int
main (void)
{
(void)db_create((DB**)0, (DB_ENV*)0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR == 3 || (3 == 4 && DB_VERSION_MAJOR == 5)
            yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :

            THIS_LIBS=$LIB
            lib_found=1

fi
rm -rf conftest*

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  LDFLAGS=$old_LDFLAGS
  LIBS=$old_LIBS

      if test -n "$lib_found"; then
        lib_found="";
        break;
      fi
    fi
  done

  if ${THIS_LIBS:+false} :
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "DB3 major version check failed: header contains different version
See 'config.log' for more details" "$LINENO" 5; }
fi

  if test "3" = "4"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DB4 minor version and patch level" >&5
printf %s "checking for DB4 minor version and patch level... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR != 1) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1 && DB_VERSION_PATCH >= 25)
      yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
printf "%s\n" "ok" >&6; }
else case e in #(
  e) as_fn_error $? "Version 4.1 requires patch level 25" "$LINENO" 5 ;;
esac
fi
rm -rf conftest*

  fi
  if test "x$ext_shared" = xyes
then :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if dba can be used as shared extension" >&5
printf %s "checking if dba can be used as shared extension... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR > 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2)
      yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else case e in #(
  e) as_fn_error $? "At least version 3.3 is required" "$LINENO" 5 ;;
esac
fi
rm -rf conftest*


fi

  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi


printf "%s\n" "#define DBA_DB3 1" >>confdefs.h


  if ${THIS_INCLUDE:+false} :
then :

else case e in #(
  e)
printf "%s\n" "#define DB3_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h
 ;;
esac
fi

  THIS_RESULT=yes
  DB3_LIBS=$THIS_LIBS
  DB3_PREFIX=$THIS_PREFIX
  DB3_INCLUDE=$THIS_INCLUDE

  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX


fi

  THIS_NAME=DB3
  if test -n "Berkeley DB3"; then
    THIS_FULL_NAME="Berkeley DB3"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_DB2" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  if test "$HAVE_DB3" = "1" || test "$HAVE_DB4" = "1"; then

  THIS_NAME=DB2
  if test -n "Berkeley DB2"; then
    THIS_FULL_NAME="Berkeley DB2"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n "You cannot combine --with-db2 with --with-db3 or --with-db4"; then
    as_fn_error $? "You cannot combine --with-db2 with --with-db3 or --with-db4" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME

  fi
  for i in $PHP_DB2 $PHP_DB2/BerkeleyDB /usr/BerkeleyDB /usr/local /usr; do
    if test -f "$i/db2/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/db2/db.h
      break
    elif test -f "$i/include/db2/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db2/db.h
      break
    elif test -f "$i/include/db/db2.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db/db2.h
      break
    elif test -f "$i/include/db2.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db2.h
      break
    elif test -f "$i/include/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db.h
      break
    fi
  done

  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  for LIB in db-2 db2 db; do
    if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
      lib_found="";

  old_LDFLAGS=$LDFLAGS
  LDFLAGS="-L$THIS_PREFIX/$PHP_LIBDIR $LDFLAGS"
  old_LIBS=$LIBS
  LIBS="-l$LIB $LIBS"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "$THIS_INCLUDE"
int
main (void)
{
(void)db_appinit("", NULL, (DB_ENV*)0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR == 2 || (2 == 4 && DB_VERSION_MAJOR == 5)
            yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :

            THIS_LIBS=$LIB
            lib_found=1

fi
rm -rf conftest*

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  LDFLAGS=$old_LDFLAGS
  LIBS=$old_LIBS

      if test -n "$lib_found"; then
        lib_found="";
        break;
      fi
    fi
  done

  if ${THIS_LIBS:+false} :
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "DB2 major version check failed: header contains different version
See 'config.log' for more details" "$LINENO" 5; }
fi

  if test "2" = "4"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DB4 minor version and patch level" >&5
printf %s "checking for DB4 minor version and patch level... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR != 1) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1 && DB_VERSION_PATCH >= 25)
      yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
printf "%s\n" "ok" >&6; }
else case e in #(
  e) as_fn_error $? "Version 4.1 requires patch level 25" "$LINENO" 5 ;;
esac
fi
rm -rf conftest*

  fi
  if test "x$ext_shared" = xyes
then :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if dba can be used as shared extension" >&5
printf %s "checking if dba can be used as shared extension... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR > 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2)
      yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else case e in #(
  e) as_fn_error $? "At least version 3.3 is required" "$LINENO" 5 ;;
esac
fi
rm -rf conftest*


fi

  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi


printf "%s\n" "#define DBA_DB2 1" >>confdefs.h


  if ${THIS_INCLUDE:+false} :
then :

else case e in #(
  e)
printf "%s\n" "#define DB2_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h
 ;;
esac
fi

  THIS_RESULT=yes
  DB2_LIBS=$THIS_LIBS
  DB2_PREFIX=$THIS_PREFIX
  DB2_INCLUDE=$THIS_INCLUDE

  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX


fi

  THIS_NAME=DB2
  if test -n "Berkeley DB2"; then
    THIS_FULL_NAME="Berkeley DB2"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_DB1" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DB1 in library" >&5
printf %s "checking for DB1 in library... " >&6; }
  if test "$HAVE_DB4" = "1"; then
    THIS_VERSION=4
    THIS_LIBS=$DB4_LIBS
    THIS_PREFIX=$DB4_PREFIX
  elif test "$HAVE_DB3" = "1"; then
    THIS_LIBS=$DB3_LIBS
    THIS_PREFIX=$DB3_PREFIX
  elif test "$HAVE_DB2" = "1"; then
    THIS_VERSION=2
    THIS_LIBS=$DB2_LIBS
    THIS_PREFIX=$DB2_PREFIX
  fi
  if test "$HAVE_DB4" = "1" || test "$HAVE_DB3" = "1" || test "$HAVE_DB2" = "1"; then

printf "%s\n" "#define DB1_VERSION \"Berkeley DB 1.85 emulation in DB$THIS_VERSION\"" >>confdefs.h

    for i in \
      db$THIS_VERSION/db_185.h \
      include/db$THIS_VERSION/db_185.h \
      include/db/db_185.h \
    ; do
      if test -f "$THIS_PREFIX/$i"; then
        THIS_INCLUDE=$THIS_PREFIX/$i
        break
      fi
    done
  else

printf "%s\n" "#define DB1_VERSION \"Unknown DB1\"" >>confdefs.h

    for i in $PHP_DB1 /usr/local /usr; do
      if test -f "$i/db1/db.h"; then
        THIS_PREFIX=$i
        THIS_INCLUDE=$i/db1/db.h
        break
      elif test -f "$i/include/db1/db.h"; then
        THIS_PREFIX=$i
        THIS_INCLUDE=$i/include/db1/db.h
        break
      elif test -f "$i/include/db.h"; then
        THIS_PREFIX=$i
        THIS_INCLUDE=$i/include/db.h
        break
      fi
    done
    THIS_LIBS=db
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_LIBS" >&5
printf "%s\n" "$THIS_LIBS" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DB1 in header" >&5
printf %s "checking for DB1 in header... " >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_INCLUDE" >&5
printf "%s\n" "$THIS_INCLUDE" >&6; }
  if test -n "$THIS_INCLUDE"; then

  old_LDFLAGS=$LDFLAGS
  LDFLAGS="-L$THIS_PREFIX/$PHP_LIBDIR $LDFLAGS"
  old_LIBS=$LIBS
  LIBS="-l$THIS_LIBS $LIBS"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "$THIS_INCLUDE"
int
main (void)
{
DB * dbp = dbopen("", 0, 0, DB_HASH, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :

printf "%s\n" "#define DB1_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h


printf "%s\n" "#define DBA_DB1 1" >>confdefs.h

        THIS_RESULT=yes

else case e in #(
  e) THIS_RESULT=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  LDFLAGS=$old_LDFLAGS
  LIBS=$old_LIBS

  fi

  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi


  THIS_RESULT=yes
  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX

fi

  THIS_NAME=DB1
  if test -n "DB1"; then
    THIS_FULL_NAME="DB1"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_DBM" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  if test "x$HAVE_QDBM" = x1
then :

  THIS_NAME=DBM
  if test -n "dbm"; then
    THIS_FULL_NAME="dbm"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n "You cannot combine --with-dbm with --with-qdbm"; then
    as_fn_error $? "You cannot combine --with-dbm with --with-qdbm" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME

fi
  for i in $PHP_DBM /usr/local /usr; do
    if test -f "$i/include/dbm.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/dbm.h
      break
    elif test -f "$i/include/gdbm/dbm.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/gdbm/dbm.h
      break
    fi
  done

  if test -n "$THIS_INCLUDE"; then
    for LIB in dbm c gdbm; do

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIB""_dbminit" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dbminit in -l$LIB" >&5
printf %s "checking for dbminit in -l$LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dbminit (void);
int
main (void)
{
return dbminit ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DBM using GDBM" >&5
printf %s "checking for DBM using GDBM... " >&6; }

printf "%s\n" "#define DBM_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h

        if test "x$LIB" = xgdbm
then :


printf "%s\n" "#define DBM_VERSION \"GDBM\"" >>confdefs.h

          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e)

printf "%s\n" "#define DBM_VERSION \"DBM\"" >>confdefs.h

          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
         ;;
esac
fi

printf "%s\n" "#define DBA_DBM 1" >>confdefs.h

        THIS_LIBS=$LIB


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$LIB_dbminit

   ;;
esac
fi

      if test -n "$THIS_LIBS"; then
        break
      fi
    done
  fi


  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi


  THIS_RESULT=yes
  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX

fi

  THIS_NAME=DBM
  if test -n ""; then
    THIS_FULL_NAME=""
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_DBA" != "no" || test "$HAVE_DBA" = "1" || test "$with_cdb" = "yes" || test "$enable_inifile" = "yes" || test "$enable_flatfile" = "yes"; then
  php_dba_enable=yes
else
  php_dba_enable=no
fi


php_with_cdb=$php_dba_enable



# Check whether --with-cdb was given.
if test ${with_cdb+y}
then :
  withval=$with_cdb; PHP_CDB=$withval
else case e in #(
  e)
  PHP_CDB=$php_dba_enable

 ;;
esac
fi


ext_output=$PHP_CDB






php_enable_inifile=$php_dba_enable


# Check whether --enable-inifile was given.
if test ${enable_inifile+y}
then :
  enableval=$enable_inifile; PHP_INIFILE=$enableval
else case e in #(
  e)
  PHP_INIFILE=$php_dba_enable

 ;;
esac
fi


ext_output=$PHP_INIFILE






php_enable_flatfile=$php_dba_enable


# Check whether --enable-flatfile was given.
if test ${enable_flatfile+y}
then :
  enableval=$enable_flatfile; PHP_FLATFILE=$enableval
else case e in #(
  e)
  PHP_FLATFILE=$php_dba_enable

 ;;
esac
fi


ext_output=$PHP_FLATFILE





if test "$PHP_CDB" = "yes"; then

printf "%s\n" "#define DBA_CDB_BUILTIN 1" >>confdefs.h


printf "%s\n" "#define DBA_CDB 1" >>confdefs.h

  cdb_sources="libcdb/cdb.c libcdb/cdb_make.c libcdb/uint32.c"
  THIS_RESULT="builtin"
elif test "$PHP_CDB" != "no"; then
  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
  for i in $PHP_CDB /usr/local /usr; do
    if test -f "$i/include/cdb.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/cdb.h
      break
    fi
  done

  if test -n "$THIS_INCLUDE"; then
    for LIB in cdb c; do

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$THIS_PREFIX/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIB""_cdb_read" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cdb_read in -l$LIB" >&5
printf %s "checking for cdb_read in -l$LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char cdb_read (void);
int
main (void)
{
return cdb_read ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


printf "%s\n" "#define CDB_INCLUDE_FILE \"$THIS_INCLUDE\"" >>confdefs.h


printf "%s\n" "#define DBA_CDB 1" >>confdefs.h

        THIS_LIBS=$LIB


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$LIB_cdb_read

   ;;
esac
fi

      if test -n "$THIS_LIBS"; then
        break
      fi
    done
  fi


  if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
    THIS_LFLAGS=$THIS_PREFIX/$PHP_LIBDIR
  fi


  THIS_RESULT=yes
  if ${THIS_INCLUDE:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
  if ${THIS_LIBS:+false} :
then :
  as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi




  if test "$ext_shared" = "yes"; then
    DBA_SHARED_LIBADD="-l$THIS_LIBS $DBA_SHARED_LIBADD"
    if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi


      if test "$ext_shared" = "yes"; then
        DBA_SHARED_LIBADD="-L$ai_p $DBA_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DBA_SHARED_LIBADD="$ld_runpath_switch$ai_p $DBA_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$THIS_LFLAGS"; then

  if test "$THIS_LFLAGS" != "/usr/$PHP_LIBDIR" && test "$THIS_LFLAGS" != "/usr/lib"; then

  if test -z "$THIS_LFLAGS" || echo "$THIS_LFLAGS" | grep '^/' >/dev/null ; then
    ai_p=$THIS_LFLAGS
  else

    ep_dir=$(echo $THIS_LFLAGS|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$THIS_LFLAGS")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $THIS_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$THIS_LIBS $LIBS"
   ;;
  esac




  fi


  unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX

fi

  THIS_NAME=CDB
  if test -n ""; then
    THIS_FULL_NAME=""
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_INIFILE" != "no"; then

printf "%s\n" "#define DBA_INIFILE 1" >>confdefs.h

  ini_sources="libinifile/inifile.c"
  THIS_RESULT="builtin"
fi

  THIS_NAME=INIFILE
  if test -n "INI File"; then
    THIS_FULL_NAME="INI File"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


if test "$PHP_FLATFILE" != "no"; then

printf "%s\n" "#define DBA_FLATFILE 1" >>confdefs.h

  flat_sources="libflatfile/flatfile.c"
  THIS_RESULT="builtin"
fi

  THIS_NAME=FLATFILE
  if test -n "FlatFile"; then
    THIS_FULL_NAME="FlatFile"
  else
    THIS_FULL_NAME="$THIS_NAME"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
printf %s "checking for $THIS_FULL_NAME support... " >&6; }
  if test -n ""; then
    as_fn_error $? "" "$LINENO" 5
  fi
  if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
    HAVE_DBA=1
    eval HAVE_$THIS_NAME=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIS_RESULT" >&5
printf "%s\n" "$THIS_RESULT" >&6; }
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
  unset THIS_RESULT THIS_NAME THIS_FULL_NAME


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable DBA interface" >&5
printf %s "checking whether to enable DBA interface... " >&6; }
if test "x$HAVE_DBA" = x1
then :

  if test "x$ext_shared" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, shared" >&5
printf "%s\n" "yes, shared" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; } ;;
esac
fi


printf "%s\n" "#define HAVE_DBA 1" >>confdefs.h


  ext_builddir=ext/dba
  ext_srcdir=$abs_srcdir/ext/dba
  ext_dir=ext/dba

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_DBA_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_db4.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_inifile.c dba_lmdb.c dba_ndbm.c dba_qdbm.c dba_tcadb.c dba.c $cdb_sources $flat_sources $ini_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC dba;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC dba;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_DBA_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_db4.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_inifile.c dba_lmdb.c dba_ndbm.c dba_qdbm.c dba_tcadb.c dba.c $cdb_sources $flat_sources $ini_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_dba="$shared_objects_dba $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/dba.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/dba.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_dba"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/dba.$suffix: $ext_builddir/dba.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/dba.$suffix \$(phplibdir)

$ext_builddir/dba.$suffix: \$(shared_objects_dba) \$(DBA_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_dba) \$(DBA_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_DBA 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_DBA_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_db4.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_inifile.c dba_lmdb.c dba_ndbm.c dba_qdbm.c dba_tcadb.c dba.c $cdb_sources $flat_sources $ini_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC dba;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_db4.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_inifile.c dba_lmdb.c dba_ndbm.c dba_qdbm.c dba_tcadb.c dba.c $cdb_sources $flat_sources $ini_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC dba;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=dba

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

  as_fn_append BUILD_DIR " $ext_builddir/libcdb $ext_builddir/libflatfile $ext_builddir/libinifile"


  PHP_VAR_SUBST="$PHP_VAR_SUBST DBA_SHARED_LIBADD"


else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi





php_enable_dl_test=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable dl-test extension" >&5
printf %s "checking whether to enable dl-test extension... " >&6; }
# Check whether --enable-dl-test was given.
if test ${enable_dl_test+y}
then :
  enableval=$enable_dl_test; PHP_DL_TEST=$enableval
else case e in #(
  e)
  PHP_DL_TEST=no
  test "$PHP_ENABLE_ALL" && PHP_DL_TEST=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_DL_TEST in
shared,*)
  PHP_DL_TEST=$(echo "$PHP_DL_TEST"|$SED 's/^shared,//')
  ;;
shared)
  PHP_DL_TEST=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_DL_TEST" != "no"; then
    ext_shared=yes


  ext_builddir=ext/dl_test
  ext_srcdir=$abs_srcdir/ext/dl_test
  ext_dir=ext/dl_test

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_DL_TEST_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dl_test.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC dl_test;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC dl_test;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_DL_TEST_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in dl_test.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_dl_test="$shared_objects_dl_test $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/dl_test.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/dl_test.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_dl_test"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/dl_test.$suffix: $ext_builddir/dl_test.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/dl_test.$suffix \$(phplibdir)

$ext_builddir/dl_test.$suffix: \$(shared_objects_dl_test) \$(DL_TEST_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_dl_test) \$(DL_TEST_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_DL_TEST 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_DL_TEST_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dl_test.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC dl_test;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dl_test.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC dl_test;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=dl_test

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

fi





php_enable_dom=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable DOM support" >&5
printf %s "checking whether to enable DOM support... " >&6; }
# Check whether --enable-dom was given.
if test ${enable_dom+y}
then :
  enableval=$enable_dom; PHP_DOM=$enableval
else case e in #(
  e)
  PHP_DOM=yes
  test "$PHP_ENABLE_ALL" && PHP_DOM=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_DOM in
shared,*)
  PHP_DOM=$(echo "$PHP_DOM"|$SED 's/^shared,//')
  ;;
shared)
  PHP_DOM=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_DOM" != "no"; then


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.9.4" >&5
printf %s "checking for libxml-2.0 >= 2.9.4... " >&6; }

if test -n "$LIBXML_CFLAGS"; then
    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBXML_LIBS"; then
    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        else
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBXML_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libxml-2.0 >= 2.9.4) were not met:

$LIBXML_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $LIBXML_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBXML_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  DOM_SHARED_LIBADD="$DOM_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        DOM_SHARED_LIBADD="$DOM_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        DOM_SHARED_LIBADD="-L$ai_p $DOM_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && DOM_SHARED_LIBADD="$ld_runpath_switch$ai_p $DOM_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_DOM 1" >>confdefs.h


  ext_builddir=ext/dom
  ext_srcdir=$abs_srcdir/ext/dom
  ext_dir=ext/dom

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_DOM_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c documenttype.c dom_iterators.c domexception.c domimplementation.c element.c entity.c entityreference.c html_collection.c html_document.c html5_parser.c html5_serializer.c infra.c inner_outer_html_mixin.c namednodemap.c namespace_compat.c node.c nodelist.c notation.c obj_map.c parentnode/css_selectors.c parentnode/tree.c php_dom.c private_data.c processinginstruction.c text.c token_list.c xml_document.c xml_serializer.c xpath_callbacks.c xpath.c lexbor/selectors-adapted/selectors.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC dom;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC dom;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_DOM_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c documenttype.c dom_iterators.c domexception.c domimplementation.c element.c entity.c entityreference.c html_collection.c html_document.c html5_parser.c html5_serializer.c infra.c inner_outer_html_mixin.c namednodemap.c namespace_compat.c node.c nodelist.c notation.c obj_map.c parentnode/css_selectors.c parentnode/tree.c php_dom.c private_data.c processinginstruction.c text.c token_list.c xml_document.c xml_serializer.c xpath_callbacks.c xpath.c lexbor/selectors-adapted/selectors.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_dom="$shared_objects_dom $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/dom.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/dom.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_dom"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/dom.$suffix: $ext_builddir/dom.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/dom.$suffix \$(phplibdir)

$ext_builddir/dom.$suffix: \$(shared_objects_dom) \$(DOM_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_dom) \$(DOM_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_DOM 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_DOM_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c documenttype.c dom_iterators.c domexception.c domimplementation.c element.c entity.c entityreference.c html_collection.c html_document.c html5_parser.c html5_serializer.c infra.c inner_outer_html_mixin.c namednodemap.c namespace_compat.c node.c nodelist.c notation.c obj_map.c parentnode/css_selectors.c parentnode/tree.c php_dom.c private_data.c processinginstruction.c text.c token_list.c xml_document.c xml_serializer.c xpath_callbacks.c xpath.c lexbor/selectors-adapted/selectors.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC dom;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c documenttype.c dom_iterators.c domexception.c domimplementation.c element.c entity.c entityreference.c html_collection.c html_document.c html5_parser.c html5_serializer.c infra.c inner_outer_html_mixin.c namednodemap.c namespace_compat.c node.c nodelist.c notation.c obj_map.c parentnode/css_selectors.c parentnode/tree.c php_dom.c private_data.c processinginstruction.c text.c token_list.c xml_document.c xml_serializer.c xpath_callbacks.c xpath.c lexbor/selectors-adapted/selectors.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC dom;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=dom

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

    as_fn_append BUILD_DIR " $ext_builddir/parentnode $ext_builddir/lexbor/selectors-adapted"


  PHP_VAR_SUBST="$PHP_VAR_SUBST DOM_SHARED_LIBADD"


    header_path=ext/dom
    for header_file in dom_ce.h namespace_compat.h xml_common.h xpath_callbacks.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



  am_i_shared=$PHP_DOM_SHARED
  is_it_shared=$PHP_LIBXML_SHARED
  is_it_enabled=$PHP_LIBXML
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension dom to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build dom shared or build libxml statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension dom, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_DOM_SHARED
  is_it_shared=$PHP_LEXBOR_SHARED
  is_it_enabled=$PHP_LEXBOR
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension dom to build statically, but it
depends on extension lexbor, which you've configured to build shared.
You either need to build dom shared or build lexbor statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension dom, which depends on extension lexbor,
but you've either not enabled lexbor, or have disabled it.
" "$LINENO" 5
  fi



fi





php_with_enchant=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with Enchant support" >&5
printf %s "checking whether to build with Enchant support... " >&6; }

# Check whether --with-enchant was given.
if test ${with_enchant+y}
then :
  withval=$with_enchant; PHP_ENCHANT=$withval
else case e in #(
  e)
  PHP_ENCHANT=no
  test "$PHP_ENABLE_ALL" && PHP_ENCHANT=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_ENCHANT in
shared,*)
  PHP_ENCHANT=$(echo "$PHP_ENCHANT"|$SED 's/^shared,//')
  ;;
shared)
  PHP_ENCHANT=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_ENCHANT" != "no"; then

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for enchant-2" >&5
printf %s "checking for enchant-2... " >&6; }

if test -n "$ENCHANT2_CFLAGS"; then
    pkg_cv_ENCHANT2_CFLAGS="$ENCHANT2_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant-2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "enchant-2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ENCHANT2_CFLAGS=`$PKG_CONFIG --cflags "enchant-2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ENCHANT2_LIBS"; then
    pkg_cv_ENCHANT2_LIBS="$ENCHANT2_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant-2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "enchant-2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ENCHANT2_LIBS=`$PKG_CONFIG --libs "enchant-2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ENCHANT2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "enchant-2" 2>&1`
        else
	        ENCHANT2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "enchant-2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ENCHANT2_PKG_ERRORS" >&5

	found_enchant_2=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	found_enchant_2=no
else
	ENCHANT2_CFLAGS=$pkg_cv_ENCHANT2_CFLAGS
	ENCHANT2_LIBS=$pkg_cv_ENCHANT2_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	found_enchant_2=yes
fi

  if test "x$found_enchant_2" = xyes
then :


  for ac_i in $ENCHANT2_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $ENCHANT2_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ENCHANT_SHARED_LIBADD="$ENCHANT_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        ENCHANT_SHARED_LIBADD="$ENCHANT_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        ENCHANT_SHARED_LIBADD="-L$ai_p $ENCHANT_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && ENCHANT_SHARED_LIBADD="$ld_runpath_switch$ai_p $ENCHANT_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


printf "%s\n" "#define HAVE_ENCHANT_GET_VERSION 1" >>confdefs.h


else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libenchant-2 not found trying with old libenchant" >&5
printf "%s\n" "$as_me: WARNING: libenchant-2 not found trying with old libenchant" >&2;}

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for enchant >= 1.4.2" >&5
printf %s "checking for enchant >= 1.4.2... " >&6; }

if test -n "$ENCHANT_CFLAGS"; then
    pkg_cv_ENCHANT_CFLAGS="$ENCHANT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant >= 1.4.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "enchant >= 1.4.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ENCHANT_CFLAGS=`$PKG_CONFIG --cflags "enchant >= 1.4.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ENCHANT_LIBS"; then
    pkg_cv_ENCHANT_LIBS="$ENCHANT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant >= 1.4.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "enchant >= 1.4.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ENCHANT_LIBS=`$PKG_CONFIG --libs "enchant >= 1.4.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ENCHANT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "enchant >= 1.4.2" 2>&1`
        else
	        ENCHANT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "enchant >= 1.4.2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ENCHANT_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (enchant >= 1.4.2) were not met:

$ENCHANT_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ENCHANT_CFLAGS
and ENCHANT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ENCHANT_CFLAGS
and ENCHANT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ENCHANT_CFLAGS=$pkg_cv_ENCHANT_CFLAGS
	ENCHANT_LIBS=$pkg_cv_ENCHANT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


  for ac_i in $ENCHANT_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $ENCHANT_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ENCHANT_SHARED_LIBADD="$ENCHANT_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        ENCHANT_SHARED_LIBADD="$ENCHANT_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        ENCHANT_SHARED_LIBADD="-L$ai_p $ENCHANT_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && ENCHANT_SHARED_LIBADD="$ld_runpath_switch$ai_p $ENCHANT_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$ENCHANT_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for enchant_get_version in -lenchant" >&5
printf %s "checking for enchant_get_version in -lenchant... " >&6; }
if test ${ac_cv_lib_enchant_enchant_get_version+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lenchant  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char enchant_get_version (void);
int
main (void)
{
return enchant_get_version ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_enchant_enchant_get_version=yes
else case e in #(
  e) ac_cv_lib_enchant_enchant_get_version=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_enchant_enchant_get_version" >&5
printf "%s\n" "$ac_cv_lib_enchant_enchant_get_version" >&6; }
if test "x$ac_cv_lib_enchant_enchant_get_version" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    printf "%s\n" "#define HAVE_ENCHANT_GET_VERSION 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_enchant_enchant_get_version

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$ENCHANT_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for enchant_broker_set_param in -lenchant" >&5
printf %s "checking for enchant_broker_set_param in -lenchant... " >&6; }
if test ${ac_cv_lib_enchant_enchant_broker_set_param+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lenchant  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char enchant_broker_set_param (void);
int
main (void)
{
return enchant_broker_set_param ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_enchant_enchant_broker_set_param=yes
else case e in #(
  e) ac_cv_lib_enchant_enchant_broker_set_param=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_enchant_enchant_broker_set_param" >&5
printf "%s\n" "$ac_cv_lib_enchant_enchant_broker_set_param" >&6; }
if test "x$ac_cv_lib_enchant_enchant_broker_set_param" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_ENCHANT_BROKER_SET_PARAM 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_enchant_enchant_broker_set_param

   ;;
esac
fi

   ;;
esac
fi


printf "%s\n" "#define HAVE_ENCHANT 1" >>confdefs.h



  ext_builddir=ext/enchant
  ext_srcdir=$abs_srcdir/ext/enchant
  ext_dir=ext/enchant

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_ENCHANT_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in enchant.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC enchant;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC enchant;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_ENCHANT_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in enchant.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_enchant="$shared_objects_enchant $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/enchant.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/enchant.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_enchant"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/enchant.$suffix: $ext_builddir/enchant.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/enchant.$suffix \$(phplibdir)

$ext_builddir/enchant.$suffix: \$(shared_objects_enchant) \$(ENCHANT_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_enchant) \$(ENCHANT_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_ENCHANT 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_ENCHANT_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in enchant.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC enchant;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in enchant.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC enchant;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=enchant

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST ENCHANT_SHARED_LIBADD"

fi





php_enable_exif=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable EXIF (metadata from images) support" >&5
printf %s "checking whether to enable EXIF (metadata from images) support... " >&6; }
# Check whether --enable-exif was given.
if test ${enable_exif+y}
then :
  enableval=$enable_exif; PHP_EXIF=$enableval
else case e in #(
  e)
  PHP_EXIF=no
  test "$PHP_ENABLE_ALL" && PHP_EXIF=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_EXIF in
shared,*)
  PHP_EXIF=$(echo "$PHP_EXIF"|$SED 's/^shared,//')
  ;;
shared)
  PHP_EXIF=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_EXIF" != "no"; then

printf "%s\n" "#define HAVE_EXIF 1" >>confdefs.h


  ext_builddir=ext/exif
  ext_srcdir=$abs_srcdir/ext/exif
  ext_dir=ext/exif

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_EXIF_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in exif.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC exif;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC exif;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_EXIF_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in exif.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_exif="$shared_objects_exif $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/exif.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/exif.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_exif"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/exif.$suffix: $ext_builddir/exif.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/exif.$suffix \$(phplibdir)

$ext_builddir/exif.$suffix: \$(shared_objects_exif) \$(EXIF_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_exif) \$(EXIF_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_EXIF 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_EXIF_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in exif.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC exif;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in exif.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC exif;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=exif

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_EXIF_SHARED
  is_it_shared=$PHP_MBSTRING_SHARED
  is_it_enabled=$PHP_MBSTRING
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension exif to build statically, but it
depends on extension mbstring, which you've configured to build shared.
You either need to build exif shared or build mbstring statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
    as_fn_error $? "
You've configured extension exif, which depends on extension mbstring,
but you've either not enabled mbstring, or have disabled it.
" "$LINENO" 5
  fi

fi





php_with_ffi=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFI support" >&5
printf %s "checking for FFI support... " >&6; }

# Check whether --with-ffi was given.
if test ${with_ffi+y}
then :
  withval=$with_ffi; PHP_FFI=$withval
else case e in #(
  e)
  PHP_FFI=no
  test "$PHP_ENABLE_ALL" && PHP_FFI=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_FFI in
shared,*)
  PHP_FFI=$(echo "$PHP_FFI"|$SED 's/^shared,//')
  ;;
shared)
  PHP_FFI=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_FFI" != "no"; then

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libffi >= 3.0.11" >&5
printf %s "checking for libffi >= 3.0.11... " >&6; }

if test -n "$FFI_CFLAGS"; then
    pkg_cv_FFI_CFLAGS="$FFI_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0.11\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libffi >= 3.0.11") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi >= 3.0.11" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FFI_LIBS"; then
    pkg_cv_FFI_LIBS="$FFI_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0.11\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libffi >= 3.0.11") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FFI_LIBS=`$PKG_CONFIG --libs "libffi >= 3.0.11" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libffi >= 3.0.11" 2>&1`
        else
	        FFI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libffi >= 3.0.11" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FFI_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libffi >= 3.0.11) were not met:

$FFI_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FFI_CFLAGS
and FFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables FFI_CFLAGS
and FFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	FFI_CFLAGS=$pkg_cv_FFI_CFLAGS
	FFI_LIBS=$pkg_cv_FFI_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


  for ac_i in $FFI_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $FFI_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  FFI_SHARED_LIBADD="$FFI_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        FFI_SHARED_LIBADD="$FFI_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        FFI_SHARED_LIBADD="-L$ai_p $FFI_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && FFI_SHARED_LIBADD="$ld_runpath_switch$ai_p $FFI_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_FFI 1" >>confdefs.h


  ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
if test "x$ac_cv_type_long_double" = xyes
then :

printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h


fi




  CFLAGS_SAVE=$CFLAGS
  CFLAGS="$CFLAGS $FFI_CFLAGS"
  ac_fn_check_decl "$LINENO" "FFI_FASTCALL" "ac_cv_have_decl_FFI_FASTCALL" "#include <ffi.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_FFI_FASTCALL" = xyes
then :

printf "%s\n" "#define HAVE_FFI_FASTCALL 1" >>confdefs.h

fi
  ac_fn_check_decl "$LINENO" "FFI_THISCALL" "ac_cv_have_decl_FFI_THISCALL" "#include <ffi.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_FFI_THISCALL" = xyes
then :

printf "%s\n" "#define HAVE_FFI_THISCALL 1" >>confdefs.h

fi
  ac_fn_check_decl "$LINENO" "FFI_STDCALL" "ac_cv_have_decl_FFI_STDCALL" "#include <ffi.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_FFI_STDCALL" = xyes
then :

printf "%s\n" "#define HAVE_FFI_STDCALL 1" >>confdefs.h

fi
  ac_fn_check_decl "$LINENO" "FFI_PASCAL" "ac_cv_have_decl_FFI_PASCAL" "#include <ffi.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_FFI_PASCAL" = xyes
then :

printf "%s\n" "#define HAVE_FFI_PASCAL 1" >>confdefs.h

fi
  ac_fn_check_decl "$LINENO" "FFI_REGISTER" "ac_cv_have_decl_FFI_REGISTER" "#include <ffi.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_FFI_REGISTER" = xyes
then :

printf "%s\n" "#define HAVE_FFI_REGISTER 1" >>confdefs.h

fi
  ac_fn_check_decl "$LINENO" "FFI_MS_CDECL" "ac_cv_have_decl_FFI_MS_CDECL" "#include <ffi.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_FFI_MS_CDECL" = xyes
then :

printf "%s\n" "#define HAVE_FFI_MS_CDECL 1" >>confdefs.h

fi
  ac_fn_check_decl "$LINENO" "FFI_SYSV" "ac_cv_have_decl_FFI_SYSV" "#include <ffi.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_FFI_SYSV" = xyes
then :

printf "%s\n" "#define HAVE_FFI_SYSV 1" >>confdefs.h

fi
  CFLAGS=$CFLAGS_SAVE


  ext_builddir=ext/ffi
  ext_srcdir=$abs_srcdir/ext/ffi
  ext_dir=ext/ffi

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_FFI_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ffi.c ffi_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC ffi;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC ffi;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_FFI_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in ffi.c ffi_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_ffi="$shared_objects_ffi $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/ffi.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/ffi.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_ffi"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/ffi.$suffix: $ext_builddir/ffi.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/ffi.$suffix \$(phplibdir)

$ext_builddir/ffi.$suffix: \$(shared_objects_ffi) \$(FFI_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_ffi) \$(FFI_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_FFI 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_FFI_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ffi.c ffi_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC ffi;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ffi.c ffi_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC ffi;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=ffi

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST FFI_SHARED_LIBADD"

fi





php_enable_fileinfo=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fileinfo support" >&5
printf %s "checking for fileinfo support... " >&6; }
# Check whether --enable-fileinfo was given.
if test ${enable_fileinfo+y}
then :
  enableval=$enable_fileinfo; PHP_FILEINFO=$enableval
else case e in #(
  e)
  PHP_FILEINFO=yes
  test "$PHP_ENABLE_ALL" && PHP_FILEINFO=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_FILEINFO in
shared,*)
  PHP_FILEINFO=$(echo "$PHP_FILEINFO"|$SED 's/^shared,//')
  ;;
shared)
  PHP_FILEINFO=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_FILEINFO" != "no"; then
  libmagic_sources=" libmagic/apprentice.c libmagic/apptype.c libmagic/ascmagic.c libmagic/buffer.c libmagic/cdf_time.c libmagic/cdf.c libmagic/compress.c libmagic/der.c libmagic/encoding.c libmagic/fsmagic.c libmagic/funcs.c libmagic/is_csv.c libmagic/is_json.c libmagic/is_simh.c libmagic/is_tar.c libmagic/magic.c libmagic/print.c libmagic/readcdf.c libmagic/softmagic.c "

  ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_sysmacros_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h

fi



  for ac_func in strcasestr
do :
  ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
if test "x$ac_cv_func_strcasestr" = xyes
then :
  printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h

else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using libmagic strcasestr implementation" >&5
printf "%s\n" "$as_me: using libmagic strcasestr implementation" >&6;}
    libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
   ;;
esac
fi

done




    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((visibility))" >&5
printf %s "checking for __attribute__((visibility))... " >&6; }
if test ${ax_cv_have_func_attribute_visibility+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


                    int foo_def( void ) __attribute__((visibility("default")));
                    int foo_hid( void ) __attribute__((visibility("hidden")));
                    int foo_int( void ) __attribute__((visibility("internal")));
                    int foo_pro( void ) __attribute__((visibility("protected")));

int
main (void)
{

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
                                      if test -s conftest.err
then :
  ax_cv_have_func_attribute_visibility=no
else case e in #(
  e) ax_cv_have_func_attribute_visibility=yes ;;
esac
fi
else case e in #(
  e) ax_cv_have_func_attribute_visibility=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
     ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_visibility" >&5
printf "%s\n" "$ax_cv_have_func_attribute_visibility" >&6; }

    if test yes = $ax_cv_have_func_attribute_visibility
then :

printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1" >>confdefs.h

fi





  ext_builddir=ext/fileinfo
  ext_srcdir=$abs_srcdir/ext/fileinfo
  ext_dir=ext/fileinfo

  ac_extra=$(echo "-I@ext_srcdir@/libmagic"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_FILEINFO_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fileinfo.c php_libmagic.c $libmagic_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC fileinfo;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC fileinfo;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_FILEINFO_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in fileinfo.c php_libmagic.c $libmagic_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_fileinfo="$shared_objects_fileinfo $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/fileinfo.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/fileinfo.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_fileinfo"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/fileinfo.$suffix: $ext_builddir/fileinfo.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/fileinfo.$suffix \$(phplibdir)

$ext_builddir/fileinfo.$suffix: \$(shared_objects_fileinfo) \$(FILEINFO_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_fileinfo) \$(FILEINFO_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_FILEINFO 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_FILEINFO_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fileinfo.c php_libmagic.c $libmagic_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC fileinfo;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fileinfo.c php_libmagic.c $libmagic_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC fileinfo;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=fileinfo

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

  as_fn_append BUILD_DIR " $ext_builddir/libmagic"


  am_i_shared=$PHP_FILEINFO_SHARED
  is_it_shared=$PHP_PCRE_SHARED
  is_it_enabled=$PHP_PCRE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension fileinfo to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build fileinfo shared or build pcre statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension fileinfo, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
  fi


  ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
if test "x$ac_cv_func_utimes" = xyes
then :
  printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "strndup" "ac_cv_func_strndup"
if test "x$ac_cv_func_strndup" = xyes
then :
  printf "%s\n" "#define HAVE_STRNDUP 1" >>confdefs.h

fi


    src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

fi





php_enable_filter=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable input filter support" >&5
printf %s "checking whether to enable input filter support... " >&6; }
# Check whether --enable-filter was given.
if test ${enable_filter+y}
then :
  enableval=$enable_filter; PHP_FILTER=$enableval
else case e in #(
  e)
  PHP_FILTER=yes
  test "$PHP_ENABLE_ALL" && PHP_FILTER=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_FILTER in
shared,*)
  PHP_FILTER=$(echo "$PHP_FILTER"|$SED 's/^shared,//')
  ;;
shared)
  PHP_FILTER=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_FILTER" != "no"; then

  ext_builddir=ext/filter
  ext_srcdir=$abs_srcdir/ext/filter
  ext_dir=ext/filter

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_FILTER_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in filter.c sanitizing_filters.c logical_filters.c callback_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC filter;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC filter;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_FILTER_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in filter.c sanitizing_filters.c logical_filters.c callback_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_filter="$shared_objects_filter $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/filter.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/filter.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_filter"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/filter.$suffix: $ext_builddir/filter.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/filter.$suffix \$(phplibdir)

$ext_builddir/filter.$suffix: \$(shared_objects_filter) \$(FILTER_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_filter) \$(FILTER_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_FILTER 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_FILTER_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in filter.c sanitizing_filters.c logical_filters.c callback_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC filter;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in filter.c sanitizing_filters.c logical_filters.c callback_filter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC filter;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=filter

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi



    header_path=ext/filter
    for header_file in php_filter.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



  am_i_shared=$PHP_FILTER_SHARED
  is_it_shared=$PHP_PCRE_SHARED
  is_it_enabled=$PHP_PCRE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension filter to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build filter shared or build pcre statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension filter, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
  fi

fi





php_enable_ftp=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable FTP support" >&5
printf %s "checking whether to enable FTP support... " >&6; }
# Check whether --enable-ftp was given.
if test ${enable_ftp+y}
then :
  enableval=$enable_ftp; PHP_FTP=$enableval
else case e in #(
  e)
  PHP_FTP=no
  test "$PHP_ENABLE_ALL" && PHP_FTP=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_FTP in
shared,*)
  PHP_FTP=$(echo "$PHP_FTP"|$SED 's/^shared,//')
  ;;
shared)
  PHP_FTP=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if ${PHP_OPENSSL:+false} :
then :
  PHP_OPENSSL=no
fi


php_with_ftp_ssl=$PHP_OPENSSL

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable FTP over SSL support" >&5
printf %s "checking whether to enable FTP over SSL support... " >&6; }

# Check whether --with-ftp-ssl was given.
if test ${with_ftp_ssl+y}
then :
  withval=$with_ftp_ssl; PHP_FTP_SSL=$withval
else case e in #(
  e)
  PHP_FTP_SSL=$PHP_OPENSSL

 ;;
esac
fi


ext_output=$PHP_FTP_SSL
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_FTP" = "yes"; then

printf "%s\n" "#define HAVE_FTP 1" >>confdefs.h


  ext_builddir=ext/ftp
  ext_srcdir=$abs_srcdir/ext/ftp
  ext_dir=ext/ftp

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_FTP_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_ftp.c ftp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC ftp;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC ftp;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_FTP_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_ftp.c ftp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_ftp="$shared_objects_ftp $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/ftp.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/ftp.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_ftp"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/ftp.$suffix: $ext_builddir/ftp.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/ftp.$suffix \$(phplibdir)

$ext_builddir/ftp.$suffix: \$(shared_objects_ftp) \$(FTP_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_ftp) \$(FTP_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_FTP 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_FTP_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_ftp.c ftp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC ftp;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_ftp.c ftp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC ftp;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=ftp

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  if test "x$PHP_FTP_SSL" = xno
then :

else case e in #(
  e)

  found_openssl=no


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl >= 1.1.1" >&5
printf %s "checking for openssl >= 1.1.1... " >&6; }

if test -n "$OPENSSL_CFLAGS"; then
    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl >= 1.1.1" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$OPENSSL_LIBS"; then
    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl >= 1.1.1" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
        else
	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$OPENSSL_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (openssl >= 1.1.1) were not met:

$OPENSSL_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	found_openssl=yes
fi

  if test "$found_openssl" = "yes"; then

  for ac_i in $OPENSSL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  FTP_SHARED_LIBADD="$FTP_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        FTP_SHARED_LIBADD="$FTP_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        FTP_SHARED_LIBADD="-L$ai_p $FTP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && FTP_SHARED_LIBADD="$ld_runpath_switch$ai_p $FTP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $OPENSSL_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done

:
  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST FTP_SHARED_LIBADD"


printf "%s\n" "#define HAVE_FTP_SSL 1" >>confdefs.h

   ;;
esac
fi
fi





php_enable_gd=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GD support" >&5
printf %s "checking for GD support... " >&6; }
# Check whether --enable-gd was given.
if test ${enable_gd+y}
then :
  enableval=$enable_gd; PHP_GD=$enableval
else case e in #(
  e)
  PHP_GD=no
  test "$PHP_ENABLE_ALL" && PHP_GD=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_GD in
shared,*)
  PHP_GD=$(echo "$PHP_GD"|$SED 's/^shared,//')
  ;;
shared)
  PHP_GD=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_external_gd=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external libgd" >&5
printf %s "checking for external libgd... " >&6; }

# Check whether --with-external-gd was given.
if test ${with_external_gd+y}
then :
  withval=$with_external_gd; PHP_EXTERNAL_GD=$withval
else case e in #(
  e)
  PHP_EXTERNAL_GD=no

 ;;
esac
fi


ext_output=$PHP_EXTERNAL_GD
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_avif=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libavif" >&5
printf %s "checking for libavif... " >&6; }

# Check whether --with-avif was given.
if test ${with_avif+y}
then :
  withval=$with_avif; PHP_AVIF=$withval
else case e in #(
  e)
  PHP_AVIF=no

 ;;
esac
fi


ext_output=$PHP_AVIF
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_webp=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libwebp" >&5
printf %s "checking for libwebp... " >&6; }

# Check whether --with-webp was given.
if test ${with_webp+y}
then :
  withval=$with_webp; PHP_WEBP=$withval
else case e in #(
  e)
  PHP_WEBP=no

 ;;
esac
fi


ext_output=$PHP_WEBP
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_jpeg=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libjpeg" >&5
printf %s "checking for libjpeg... " >&6; }

# Check whether --with-jpeg was given.
if test ${with_jpeg+y}
then :
  withval=$with_jpeg; PHP_JPEG=$withval
else case e in #(
  e)
  PHP_JPEG=no

 ;;
esac
fi


ext_output=$PHP_JPEG
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_xpm=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libXpm" >&5
printf %s "checking for libXpm... " >&6; }

# Check whether --with-xpm was given.
if test ${with_xpm+y}
then :
  withval=$with_xpm; PHP_XPM=$withval
else case e in #(
  e)
  PHP_XPM=no

 ;;
esac
fi


ext_output=$PHP_XPM
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_freetype=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeType 2" >&5
printf %s "checking for FreeType 2... " >&6; }

# Check whether --with-freetype was given.
if test ${with_freetype+y}
then :
  withval=$with_freetype; PHP_FREETYPE=$withval
else case e in #(
  e)
  PHP_FREETYPE=no

 ;;
esac
fi


ext_output=$PHP_FREETYPE
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_enable_gd_jis_conv=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable JIS-mapped Japanese font support in GD" >&5
printf %s "checking whether to enable JIS-mapped Japanese font support in GD... " >&6; }
# Check whether --enable-gd-jis-conv was given.
if test ${enable_gd_jis_conv+y}
then :
  enableval=$enable_gd_jis_conv; PHP_GD_JIS_CONV=$enableval
else case e in #(
  e)
  PHP_GD_JIS_CONV=no

 ;;
esac
fi


ext_output=$PHP_GD_JIS_CONV
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }
























if test "$PHP_GD" != "no"; then
  if test "$PHP_EXTERNAL_GD" = "no"; then
    extra_sources=" libgd/gd_avif.c libgd/gd_bmp.c libgd/gd_color_match.c libgd/gd_crop.c libgd/gd_filter.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_gif_in.c libgd/gd_gif_out.c libgd/gd_interpolation.c libgd/gd_io_dp.c libgd/gd_io_file.c libgd/gd_io_ss.c libgd/gd_io.c libgd/gd_jpeg.c libgd/gd_matrix.c libgd/gd_png.c libgd/gd_rotate.c libgd/gd_security.c libgd/gd_ss.c libgd/gd_tga.c libgd/gd_topal.c libgd/gd_transform.c libgd/gd_wbmp.c libgd/gd_webp.c libgd/gd_xbm.c libgd/gd.c libgd/gdcache.c libgd/gdfontg.c libgd/gdfontl.c libgd/gdfontmb.c libgd/gdfonts.c libgd/gdfontt.c libgd/gdft.c libgd/gdhelpers.c libgd/gdkanji.c libgd/gdtables.c libgd/gdxpm.c libgd/wbmp.c "


printf "%s\n" "#define HAVE_GD_BUNDLED 1" >>confdefs.h



pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.11" >&5
printf %s "checking for zlib >= 1.2.11... " >&6; }

if test -n "$ZLIB_CFLAGS"; then
    pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
  ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.11" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ZLIB_LIBS"; then
    pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
  ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.11" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
        else
	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ZLIB_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (zlib >= 1.2.11) were not met:

$ZLIB_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ZLIB_CFLAGS
and ZLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ZLIB_CFLAGS
and ZLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
	ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

  for ac_i in $ZLIB_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $ZLIB_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GD_SHARED_LIBADD="$GD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="$GD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


fi


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpng" >&5
printf %s "checking for libpng... " >&6; }

if test -n "$PNG_CFLAGS"; then
    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$PNG_LIBS"; then
    pkg_cv_PNG_LIBS="$PNG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpng" 2>&1`
        else
	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpng" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$PNG_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libpng) were not met:

$PNG_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PNG_CFLAGS
and PNG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables PNG_CFLAGS
and PNG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
	PNG_LIBS=$pkg_cv_PNG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $PNG_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GD_SHARED_LIBADD="$GD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="$GD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $PNG_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


printf "%s\n" "#define HAVE_LIBPNG 1" >>confdefs.h


printf "%s\n" "#define HAVE_GD_PNG 1" >>confdefs.h



  if test "x$PHP_AVIF" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libavif >= 0.8.2" >&5
printf %s "checking for libavif >= 0.8.2... " >&6; }

if test -n "$AVIF_CFLAGS"; then
    pkg_cv_AVIF_CFLAGS="$AVIF_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavif >= 0.8.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libavif >= 0.8.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_AVIF_CFLAGS=`$PKG_CONFIG --cflags "libavif >= 0.8.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$AVIF_LIBS"; then
    pkg_cv_AVIF_LIBS="$AVIF_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavif >= 0.8.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libavif >= 0.8.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_AVIF_LIBS=`$PKG_CONFIG --libs "libavif >= 0.8.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        AVIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libavif >= 0.8.2" 2>&1`
        else
	        AVIF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libavif >= 0.8.2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$AVIF_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libavif >= 0.8.2) were not met:

$AVIF_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables AVIF_CFLAGS
and AVIF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables AVIF_CFLAGS
and AVIF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	AVIF_CFLAGS=$pkg_cv_AVIF_CFLAGS
	AVIF_LIBS=$pkg_cv_AVIF_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $AVIF_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GD_SHARED_LIBADD="$GD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="$GD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $AVIF_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


printf "%s\n" "#define HAVE_LIBAVIF 1" >>confdefs.h


printf "%s\n" "#define HAVE_GD_AVIF 1" >>confdefs.h

   ;;
esac
fi


  if test "x$PHP_WEBP" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libwebp >= 0.2.0" >&5
printf %s "checking for libwebp >= 0.2.0... " >&6; }

if test -n "$WEBP_CFLAGS"; then
    pkg_cv_WEBP_CFLAGS="$WEBP_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp >= 0.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libwebp >= 0.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBP_CFLAGS=`$PKG_CONFIG --cflags "libwebp >= 0.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$WEBP_LIBS"; then
    pkg_cv_WEBP_LIBS="$WEBP_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp >= 0.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libwebp >= 0.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBP_LIBS=`$PKG_CONFIG --libs "libwebp >= 0.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        WEBP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libwebp >= 0.2.0" 2>&1`
        else
	        WEBP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libwebp >= 0.2.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$WEBP_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libwebp >= 0.2.0) were not met:

$WEBP_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables WEBP_CFLAGS
and WEBP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables WEBP_CFLAGS
and WEBP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	WEBP_CFLAGS=$pkg_cv_WEBP_CFLAGS
	WEBP_LIBS=$pkg_cv_WEBP_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $WEBP_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GD_SHARED_LIBADD="$GD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="$GD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $WEBP_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


printf "%s\n" "#define HAVE_LIBWEBP 1" >>confdefs.h


printf "%s\n" "#define HAVE_GD_WEBP 1" >>confdefs.h

   ;;
esac
fi


  if test "x$PHP_JPEG" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libjpeg" >&5
printf %s "checking for libjpeg... " >&6; }

if test -n "$JPEG_CFLAGS"; then
    pkg_cv_JPEG_CFLAGS="$JPEG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libjpeg\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libjpeg") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_JPEG_CFLAGS=`$PKG_CONFIG --cflags "libjpeg" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$JPEG_LIBS"; then
    pkg_cv_JPEG_LIBS="$JPEG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libjpeg\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libjpeg") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_JPEG_LIBS=`$PKG_CONFIG --libs "libjpeg" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        JPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libjpeg" 2>&1`
        else
	        JPEG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libjpeg" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$JPEG_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libjpeg) were not met:

$JPEG_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables JPEG_CFLAGS
and JPEG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables JPEG_CFLAGS
and JPEG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	JPEG_CFLAGS=$pkg_cv_JPEG_CFLAGS
	JPEG_LIBS=$pkg_cv_JPEG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $JPEG_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GD_SHARED_LIBADD="$GD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="$GD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $JPEG_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


printf "%s\n" "#define HAVE_LIBJPEG 1" >>confdefs.h


printf "%s\n" "#define HAVE_GD_JPG 1" >>confdefs.h

   ;;
esac
fi


  if test "x$PHP_XPM" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xpm" >&5
printf %s "checking for xpm... " >&6; }

if test -n "$XPM_CFLAGS"; then
    pkg_cv_XPM_CFLAGS="$XPM_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xpm\""; } >&5
  ($PKG_CONFIG --exists --print-errors "xpm") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XPM_CFLAGS=`$PKG_CONFIG --cflags "xpm" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$XPM_LIBS"; then
    pkg_cv_XPM_LIBS="$XPM_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xpm\""; } >&5
  ($PKG_CONFIG --exists --print-errors "xpm") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XPM_LIBS=`$PKG_CONFIG --libs "xpm" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        XPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xpm" 2>&1`
        else
	        XPM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xpm" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$XPM_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (xpm) were not met:

$XPM_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables XPM_CFLAGS
and XPM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables XPM_CFLAGS
and XPM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	XPM_CFLAGS=$pkg_cv_XPM_CFLAGS
	XPM_LIBS=$pkg_cv_XPM_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $XPM_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GD_SHARED_LIBADD="$GD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="$GD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $XPM_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


printf "%s\n" "#define HAVE_XPM 1" >>confdefs.h


printf "%s\n" "#define HAVE_GD_XPM 1" >>confdefs.h

   ;;
esac
fi


  if test "x$PHP_FREETYPE" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
printf %s "checking for freetype2... " >&6; }

if test -n "$FREETYPE2_CFLAGS"; then
    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FREETYPE2_LIBS"; then
    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1`
        else
	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FREETYPE2_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (freetype2) were not met:

$FREETYPE2_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FREETYPE2_CFLAGS
and FREETYPE2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables FREETYPE2_CFLAGS
and FREETYPE2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $FREETYPE2_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $FREETYPE2_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GD_SHARED_LIBADD="$GD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="$GD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


printf "%s\n" "#define HAVE_LIBFREETYPE 1" >>confdefs.h


printf "%s\n" "#define HAVE_GD_FREETYPE 1" >>confdefs.h

   ;;
esac
fi


  if test "x$PHP_GD_JIS_CONV" = xyes
then :


printf "%s\n" "#define USE_GD_JISX0208 1" >>confdefs.h


printf "%s\n" "#define JISX0208 1" >>confdefs.h


fi



  ext_builddir=ext/gd
  ext_srcdir=$abs_srcdir/ext/gd
  ext_dir=ext/gd

  ac_extra=$(echo "-Wno-strict-prototypes -I@ext_srcdir@/libgd"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_GD_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gd.c $extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC gd;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC gd;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_GD_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in gd.c $extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_gd="$shared_objects_gd $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/gd.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/gd.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_gd"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/gd.$suffix: $ext_builddir/gd.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/gd.$suffix \$(phplibdir)

$ext_builddir/gd.$suffix: \$(shared_objects_gd) \$(GD_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_gd) \$(GD_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_GD 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_GD_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gd.c $extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC gd;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gd.c $extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC gd;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=gd

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

    as_fn_append BUILD_DIR " $ext_builddir/libgd"



    header_path=ext/gd
    for header_file in php_gd.h libgd/; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build works" >&5
printf %s "checking whether build works... " >&6; }
if test ${php_cv_lib_gd_works+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
      LIBS_SAVED=$LIBS
      LIBS="$GD_SHARED_LIBADD $LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_lib_gd_works=yes
else case e in #(
  e) php_cv_lib_gd_works=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
      LIBS=$LIBS_SAVED
     ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_gd_works" >&5
printf "%s\n" "$php_cv_lib_gd_works" >&6; }
    if test "x$php_cv_lib_gd_works" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "GD library build test failed.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi
  else
    extra_sources="gd_compat.c"

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdlib >= 2.1.0" >&5
printf %s "checking for gdlib >= 2.1.0... " >&6; }

if test -n "$GDLIB_CFLAGS"; then
    pkg_cv_GDLIB_CFLAGS="$GDLIB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdlib >= 2.1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gdlib >= 2.1.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GDLIB_CFLAGS=`$PKG_CONFIG --cflags "gdlib >= 2.1.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$GDLIB_LIBS"; then
    pkg_cv_GDLIB_LIBS="$GDLIB_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdlib >= 2.1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gdlib >= 2.1.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GDLIB_LIBS=`$PKG_CONFIG --libs "gdlib >= 2.1.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        GDLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gdlib >= 2.1.0" 2>&1`
        else
	        GDLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gdlib >= 2.1.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$GDLIB_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (gdlib >= 2.1.0) were not met:

$GDLIB_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GDLIB_CFLAGS
and GDLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables GDLIB_CFLAGS
and GDLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	GDLIB_CFLAGS=$pkg_cv_GDLIB_CFLAGS
	GDLIB_LIBS=$pkg_cv_GDLIB_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $GDLIB_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GD_SHARED_LIBADD="$GD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="$GD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GD_SHARED_LIBADD="-L$ai_p $GD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GD_SHARED_LIBADD="$ld_runpath_switch$ai_p $GD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $GDLIB_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


printf "%s\n" "#define HAVE_LIBGD 1" >>confdefs.h



old_LIBS="${LIBS}"
LIBS="${LIBS} ${GD_SHARED_LIBADD}"
old_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working gdImageCreateFromPng in libgd" >&5
printf %s "checking for working gdImageCreateFromPng in libgd... " >&6; }
if test ${php_cv_lib_gd_gdImageCreateFromPng+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_lib_gd_gdImageCreateFromPng=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <unistd.h>
#include <gd.h>

/* A custom gdErrorMethod */
void exit1(int priority, const char *format, va_list args) {
  (void)priority;
  (void)format;
  (void)args;
  _exit(1);
}

/* Override the default gd_error_method with one that
   actually causes the program to return an error. */
int main(void)
{
  FILE* f = NULL;
  gdSetErrorMethod(exit1);
  gdImagePtr p = gdImageCreateFromPng(f);
  (void)p;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_lib_gd_gdImageCreateFromPng=yes
else case e in #(
  e) php_cv_lib_gd_gdImageCreateFromPng=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_gd_gdImageCreateFromPng" >&5
printf "%s\n" "$php_cv_lib_gd_gdImageCreateFromPng" >&6; }
if test "x$php_cv_lib_gd_gdImageCreateFromPng" = xyes
then :
  printf "%s\n" "#define HAVE_GD_PNG 1" >>confdefs.h

fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CFLAGS="${old_CFLAGS}"
LIBS="${old_LIBS}"



old_LIBS="${LIBS}"
LIBS="${LIBS} ${GD_SHARED_LIBADD}"
old_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working gdImageCreateFromAvif in libgd" >&5
printf %s "checking for working gdImageCreateFromAvif in libgd... " >&6; }
if test ${php_cv_lib_gd_gdImageCreateFromAvif+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_lib_gd_gdImageCreateFromAvif=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <unistd.h>
#include <gd.h>

/* A custom gdErrorMethod */
void exit1(int priority, const char *format, va_list args) {
  (void)priority;
  (void)format;
  (void)args;
  _exit(1);
}

/* Override the default gd_error_method with one that
   actually causes the program to return an error. */
int main(void)
{
  FILE* f = NULL;
  gdSetErrorMethod(exit1);
  gdImagePtr p = gdImageCreateFromAvif(f);
  (void)p;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_lib_gd_gdImageCreateFromAvif=yes
else case e in #(
  e) php_cv_lib_gd_gdImageCreateFromAvif=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_gd_gdImageCreateFromAvif" >&5
printf "%s\n" "$php_cv_lib_gd_gdImageCreateFromAvif" >&6; }
if test "x$php_cv_lib_gd_gdImageCreateFromAvif" = xyes
then :
  printf "%s\n" "#define HAVE_GD_AVIF 1" >>confdefs.h

fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CFLAGS="${old_CFLAGS}"
LIBS="${old_LIBS}"



old_LIBS="${LIBS}"
LIBS="${LIBS} ${GD_SHARED_LIBADD}"
old_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working gdImageCreateFromWebp in libgd" >&5
printf %s "checking for working gdImageCreateFromWebp in libgd... " >&6; }
if test ${php_cv_lib_gd_gdImageCreateFromWebp+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_lib_gd_gdImageCreateFromWebp=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <unistd.h>
#include <gd.h>

/* A custom gdErrorMethod */
void exit1(int priority, const char *format, va_list args) {
  (void)priority;
  (void)format;
  (void)args;
  _exit(1);
}

/* Override the default gd_error_method with one that
   actually causes the program to return an error. */
int main(void)
{
  FILE* f = NULL;
  gdSetErrorMethod(exit1);
  gdImagePtr p = gdImageCreateFromWebp(f);
  (void)p;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_lib_gd_gdImageCreateFromWebp=yes
else case e in #(
  e) php_cv_lib_gd_gdImageCreateFromWebp=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_gd_gdImageCreateFromWebp" >&5
printf "%s\n" "$php_cv_lib_gd_gdImageCreateFromWebp" >&6; }
if test "x$php_cv_lib_gd_gdImageCreateFromWebp" = xyes
then :
  printf "%s\n" "#define HAVE_GD_WEBP 1" >>confdefs.h

fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CFLAGS="${old_CFLAGS}"
LIBS="${old_LIBS}"



old_LIBS="${LIBS}"
LIBS="${LIBS} ${GD_SHARED_LIBADD}"
old_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working gdImageCreateFromJpeg in libgd" >&5
printf %s "checking for working gdImageCreateFromJpeg in libgd... " >&6; }
if test ${php_cv_lib_gd_gdImageCreateFromJpeg+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_lib_gd_gdImageCreateFromJpeg=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <unistd.h>
#include <gd.h>

/* A custom gdErrorMethod */
void exit1(int priority, const char *format, va_list args) {
  (void)priority;
  (void)format;
  (void)args;
  _exit(1);
}

/* Override the default gd_error_method with one that
   actually causes the program to return an error. */
int main(void)
{
  FILE* f = NULL;
  gdSetErrorMethod(exit1);
  gdImagePtr p = gdImageCreateFromJpeg(f);
  (void)p;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_lib_gd_gdImageCreateFromJpeg=yes
else case e in #(
  e) php_cv_lib_gd_gdImageCreateFromJpeg=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_gd_gdImageCreateFromJpeg" >&5
printf "%s\n" "$php_cv_lib_gd_gdImageCreateFromJpeg" >&6; }
if test "x$php_cv_lib_gd_gdImageCreateFromJpeg" = xyes
then :
  printf "%s\n" "#define HAVE_GD_JPG 1" >>confdefs.h

fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CFLAGS="${old_CFLAGS}"
LIBS="${old_LIBS}"



old_LIBS="${LIBS}"
LIBS="${LIBS} ${GD_SHARED_LIBADD}"
old_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working gdImageCreateFromXpm in libgd" >&5
printf %s "checking for working gdImageCreateFromXpm in libgd... " >&6; }
if test ${php_cv_lib_gd_gdImageCreateFromXpm+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_lib_gd_gdImageCreateFromXpm=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <unistd.h>
#include <gd.h>

/* A custom gdErrorMethod */
void exit1(int priority, const char *format, va_list args) {
  (void)priority;
  (void)format;
  (void)args;
  _exit(1);
}

/* Override the default gd_error_method with one that
   actually causes the program to return an error. */
int main(void)
{
  char* f = "test.xpm";
  gdSetErrorMethod(exit1);
  gdImagePtr p = gdImageCreateFromXpm(f);
  (void)p;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_lib_gd_gdImageCreateFromXpm=yes
else case e in #(
  e) php_cv_lib_gd_gdImageCreateFromXpm=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_gd_gdImageCreateFromXpm" >&5
printf "%s\n" "$php_cv_lib_gd_gdImageCreateFromXpm" >&6; }
if test "x$php_cv_lib_gd_gdImageCreateFromXpm" = xyes
then :
  printf "%s\n" "#define HAVE_GD_XPM 1" >>confdefs.h

fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CFLAGS="${old_CFLAGS}"
LIBS="${old_LIBS}"



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$GD_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdFontCacheShutdown in -lgd" >&5
printf %s "checking for gdFontCacheShutdown in -lgd... " >&6; }
if test ${ac_cv_lib_gd_gdFontCacheShutdown+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lgd  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char gdFontCacheShutdown (void);
int
main (void)
{
return gdFontCacheShutdown ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gd_gdFontCacheShutdown=yes
else case e in #(
  e) ac_cv_lib_gd_gdFontCacheShutdown=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdFontCacheShutdown" >&5
printf "%s\n" "$ac_cv_lib_gd_gdFontCacheShutdown" >&6; }
if test "x$ac_cv_lib_gd_gdFontCacheShutdown" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    printf "%s\n" "#define HAVE_GD_FREETYPE 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_gd_gdFontCacheShutdown

   ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$GD_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdVersionString in -lgd" >&5
printf %s "checking for gdVersionString in -lgd... " >&6; }
if test ${ac_cv_lib_gd_gdVersionString+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lgd  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char gdVersionString (void);
int
main (void)
{
return gdVersionString ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gd_gdVersionString=yes
else case e in #(
  e) ac_cv_lib_gd_gdVersionString=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdVersionString" >&5
printf "%s\n" "$ac_cv_lib_gd_gdVersionString" >&6; }
if test "x$ac_cv_lib_gd_gdVersionString" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_GD_LIBVERSION 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_gd_gdVersionString

   ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$GD_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdImageGetInterpolationMethod in -lgd" >&5
printf %s "checking for gdImageGetInterpolationMethod in -lgd... " >&6; }
if test ${ac_cv_lib_gd_gdImageGetInterpolationMethod+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lgd  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char gdImageGetInterpolationMethod (void);
int
main (void)
{
return gdImageGetInterpolationMethod ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gd_gdImageGetInterpolationMethod=yes
else case e in #(
  e) ac_cv_lib_gd_gdImageGetInterpolationMethod=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGetInterpolationMethod" >&5
printf "%s\n" "$ac_cv_lib_gd_gdImageGetInterpolationMethod" >&6; }
if test "x$ac_cv_lib_gd_gdImageGetInterpolationMethod" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_GD_GET_INTERPOLATION 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_gd_gdImageGetInterpolationMethod

   ;;
esac
fi




  ext_builddir=ext/gd
  ext_srcdir=$abs_srcdir/ext/gd
  ext_dir=ext/gd

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_GD_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gd.c $extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC gd;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC gd;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_GD_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in gd.c $extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_gd="$shared_objects_gd $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/gd.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/gd.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_gd"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/gd.$suffix: $ext_builddir/gd.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/gd.$suffix \$(phplibdir)

$ext_builddir/gd.$suffix: \$(shared_objects_gd) \$(GD_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_gd) \$(GD_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_GD 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_GD_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gd.c $extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC gd;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gd.c $extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC gd;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=gd

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/gd
    for header_file in php_gd.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$GD_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gdImageCreate in -lgd" >&5
printf %s "checking for gdImageCreate in -lgd... " >&6; }
if test ${ac_cv_lib_gd_gdImageCreate+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lgd  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char gdImageCreate (void);
int
main (void)
{
return gdImageCreate ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gd_gdImageCreate=yes
else case e in #(
  e) ac_cv_lib_gd_gdImageCreate=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreate" >&5
printf "%s\n" "$ac_cv_lib_gd_gdImageCreate" >&6; }
if test "x$ac_cv_lib_gd_gdImageCreate" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_gd_gdImageCreate
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "GD library build test failed.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST GD_SHARED_LIBADD"

fi





php_with_gettext=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext support" >&5
printf %s "checking for GNU gettext support... " >&6; }

# Check whether --with-gettext was given.
if test ${with_gettext+y}
then :
  withval=$with_gettext; PHP_GETTEXT=$withval
else case e in #(
  e)
  PHP_GETTEXT=no
  test "$PHP_ENABLE_ALL" && PHP_GETTEXT=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_GETTEXT in
shared,*)
  PHP_GETTEXT=$(echo "$PHP_GETTEXT"|$SED 's/^shared,//')
  ;;
shared)
  PHP_GETTEXT=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_GETTEXT" != "no"; then
  for i in $PHP_GETTEXT /usr/local /usr; do
    if test -r $i/include/libintl.h
then :
  GETTEXT_DIR=$i; break;
fi
  done

  if ${GETTEXT_DIR:+false} :
then :
  as_fn_error $? "Cannot locate header file libintl.h" "$LINENO" 5
fi

  GETTEXT_LIBDIR=$GETTEXT_DIR/$PHP_LIBDIR
  GETTEXT_INCDIR=$GETTEXT_DIR/include

  O_LDFLAGS=$LDFLAGS
  LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
printf %s "checking for bindtextdomain in -lintl... " >&6; }
if test ${ac_cv_lib_intl_bindtextdomain+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char bindtextdomain (void);
int
main (void)
{
return bindtextdomain ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_intl_bindtextdomain=yes
else case e in #(
  e) ac_cv_lib_intl_bindtextdomain=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
printf "%s\n" "$ac_cv_lib_intl_bindtextdomain" >&6; }
if test "x$ac_cv_lib_intl_bindtextdomain" = xyes
then :

    GETTEXT_LIBS=intl
    GETTEXT_CHECK_IN_LIB=intl

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lc" >&5
printf %s "checking for bindtextdomain in -lc... " >&6; }
if test ${ac_cv_lib_c_bindtextdomain+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lc  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char bindtextdomain (void);
int
main (void)
{
return bindtextdomain ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_c_bindtextdomain=yes
else case e in #(
  e) ac_cv_lib_c_bindtextdomain=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_bindtextdomain" >&5
printf "%s\n" "$ac_cv_lib_c_bindtextdomain" >&6; }
if test "x$ac_cv_lib_c_bindtextdomain" = xyes
then :

      GETTEXT_LIBS=
      GETTEXT_CHECK_IN_LIB=c

                                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: symlinking en_US.UTF-8 messages to en_US in case you are on musl" >&5
printf "%s\n" "$as_me: symlinking en_US.UTF-8 messages to en_US in case you are on musl" >&6;}
      _linkdest="${srcdir%/}"/ext/gettext/tests/locale/en_US
      if test ! -e "${_linkdest}"
then :

        ln -s en_US.UTF-8 "${_linkdest}"

fi


else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Unable to find required intl library for gettext.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi
 ;;
esac
fi



printf "%s\n" "#define HAVE_LIBINTL 1" >>confdefs.h


  ext_builddir=ext/gettext
  ext_srcdir=$abs_srcdir/ext/gettext
  ext_dir=ext/gettext

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_GETTEXT_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gettext.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC gettext;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC gettext;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_GETTEXT_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in gettext.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_gettext="$shared_objects_gettext $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/gettext.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/gettext.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_gettext"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/gettext.$suffix: $ext_builddir/gettext.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/gettext.$suffix \$(phplibdir)

$ext_builddir/gettext.$suffix: \$(shared_objects_gettext) \$(GETTEXT_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_gettext) \$(GETTEXT_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_GETTEXT 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_GETTEXT_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gettext.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC gettext;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gettext.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC gettext;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=gettext

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST GETTEXT_SHARED_LIBADD"



for include_path in $GETTEXT_INCDIR; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$GETTEXT_CHECK_IN_LIB""_ngettext" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
printf %s "checking for ngettext in -l$GETTEXT_CHECK_IN_LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char ngettext (void);
int
main (void)
{
return ngettext ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

printf "%s\n" "#define HAVE_NGETTEXT 1" >>confdefs.h

fi

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$GETTEXT_CHECK_IN_LIB""_dngettext" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
printf %s "checking for dngettext in -l$GETTEXT_CHECK_IN_LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dngettext (void);
int
main (void)
{
return dngettext ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

printf "%s\n" "#define HAVE_DNGETTEXT 1" >>confdefs.h

fi

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$GETTEXT_CHECK_IN_LIB""_dcngettext" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
printf %s "checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dcngettext (void);
int
main (void)
{
return dcngettext ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

printf "%s\n" "#define HAVE_DCNGETTEXT 1" >>confdefs.h

fi

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$GETTEXT_CHECK_IN_LIB""_bind_textdomain_codeset" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5
printf %s "checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char bind_textdomain_codeset (void);
int
main (void)
{
return bind_textdomain_codeset ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h

fi

  LDFLAGS=$O_LDFLAGS

  if ${GETTEXT_LIBS:+false} :
then :

else case e in #(
  e)

  if test "$ext_shared" = "yes"; then
    GETTEXT_SHARED_LIBADD="-l$GETTEXT_LIBS $GETTEXT_SHARED_LIBADD"
    if test -n "$GETTEXT_LIBDIR"; then

  if test "$GETTEXT_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GETTEXT_LIBDIR" != "/usr/lib"; then

  if test -z "$GETTEXT_LIBDIR" || echo "$GETTEXT_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$GETTEXT_LIBDIR
  else

    ep_dir=$(echo $GETTEXT_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$GETTEXT_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        GETTEXT_SHARED_LIBADD="-L$ai_p $GETTEXT_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GETTEXT_SHARED_LIBADD="$ld_runpath_switch$ai_p $GETTEXT_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$GETTEXT_LIBDIR"; then

  if test "$GETTEXT_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$GETTEXT_LIBDIR" != "/usr/lib"; then

  if test -z "$GETTEXT_LIBDIR" || echo "$GETTEXT_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$GETTEXT_LIBDIR
  else

    ep_dir=$(echo $GETTEXT_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$GETTEXT_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $GETTEXT_LIBS in
  c|c_r) ;;
  *)
      LIBS="-l$GETTEXT_LIBS $LIBS"
   ;;
  esac




  fi

 ;;
esac
fi
fi





php_with_gmp=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU MP support" >&5
printf %s "checking for GNU MP support... " >&6; }

# Check whether --with-gmp was given.
if test ${with_gmp+y}
then :
  withval=$with_gmp; PHP_GMP=$withval
else case e in #(
  e)
  PHP_GMP=no
  test "$PHP_ENABLE_ALL" && PHP_GMP=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_GMP in
shared,*)
  PHP_GMP=$(echo "$PHP_GMP"|$SED 's/^shared,//')
  ;;
shared)
  PHP_GMP=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_GMP" != "no"; then
  gmp_found=no
  if test "x$PHP_GMP" = xyes
then :

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gmp >= 4.2" >&5
printf %s "checking for gmp >= 4.2... " >&6; }

if test -n "$GMP_CFLAGS"; then
    pkg_cv_GMP_CFLAGS="$GMP_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmp >= 4.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gmp >= 4.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GMP_CFLAGS=`$PKG_CONFIG --cflags "gmp >= 4.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$GMP_LIBS"; then
    pkg_cv_GMP_LIBS="$GMP_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmp >= 4.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gmp >= 4.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GMP_LIBS=`$PKG_CONFIG --libs "gmp >= 4.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        GMP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gmp >= 4.2" 2>&1`
        else
	        GMP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gmp >= 4.2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$GMP_PKG_ERRORS" >&5

	:
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	:
else
	GMP_CFLAGS=$pkg_cv_GMP_CFLAGS
	GMP_LIBS=$pkg_cv_GMP_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	gmp_found=yes
fi
fi

  if test "x$gmp_found" = xno
then :
  if test "x$PHP_GMP" = xyes
then :
  GMP_LIBS=-lgmp
else case e in #(
  e)
    GMP_LIBS="-L$PHP_GMP/$PHP_LIBDIR -lgmp"
    GMP_CFLAGS="-I$PHP_GMP/include"
   ;;
esac
fi
fi

    CFLAGS_SAVED=$CFLAGS
  LIBS_SAVED=$LIBS
  CFLAGS="$CFLAGS $GMP_CFLAGS"
  LIBS="$LIBS $GMP_LIBS"
  gmp_check=no
  ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
if test "x$ac_cv_header_gmp_h" = xyes
then :
  ac_fn_c_check_func "$LINENO" "__gmpz_rootrem" "ac_cv_func___gmpz_rootrem"
if test "x$ac_cv_func___gmpz_rootrem" = xyes
then :
  gmp_check=yes
fi

fi

  CFLAGS=$CFLAGS_SAVED
  LIBS=$LIBS_SAVED

  if test "x$gmp_check" = xno
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "
    The required GNU MP library version 4.2 or greater not found.

See 'config.log' for more details" "$LINENO" 5; }
fi


  for ac_i in $GMP_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  GMP_SHARED_LIBADD="$GMP_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        GMP_SHARED_LIBADD="$GMP_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        GMP_SHARED_LIBADD="-L$ai_p $GMP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && GMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $GMP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $GMP_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done



    header_path=ext/gmp
    for header_file in php_gmp_int.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done




  ext_builddir=ext/gmp
  ext_srcdir=$abs_srcdir/ext/gmp
  ext_dir=ext/gmp

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_GMP_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gmp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC gmp;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC gmp;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_GMP_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in gmp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_gmp="$shared_objects_gmp $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/gmp.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/gmp.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_gmp"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/gmp.$suffix: $ext_builddir/gmp.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/gmp.$suffix \$(phplibdir)

$ext_builddir/gmp.$suffix: \$(shared_objects_gmp) \$(GMP_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_gmp) \$(GMP_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_GMP 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_GMP_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gmp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC gmp;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in gmp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC gmp;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=gmp

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST GMP_SHARED_LIBADD"


printf "%s\n" "#define HAVE_GMP 1" >>confdefs.h

fi





php_with_mhash=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mhash support" >&5
printf %s "checking for mhash support... " >&6; }

# Check whether --with-mhash was given.
if test ${with_mhash+y}
then :
  withval=$with_mhash; PHP_MHASH=$withval
else case e in #(
  e)
  PHP_MHASH=no
  test "$PHP_ENABLE_ALL" && PHP_MHASH=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_MHASH in
shared,*)
  PHP_MHASH=$(echo "$PHP_MHASH"|$SED 's/^shared,//')
  ;;
shared)
  PHP_MHASH=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_MHASH" = xno
then :

else case e in #(
  e)
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The --with-mhash option and mhash* functions are deprecated as of PHP 8.1.0" >&5
printf "%s\n" "$as_me: WARNING: The --with-mhash option and mhash* functions are deprecated as of PHP 8.1.0" >&2;}

printf "%s\n" "#define PHP_MHASH_BC 1" >>confdefs.h

 ;;
esac
fi

if test "x$ac_cv_c_bigendian_php" = xyes
then :

  EXT_HASH_SHA3_SOURCES=

printf "%s\n" "#define HAVE_SLOW_HASH3 1" >>confdefs.h

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Using SHA3 slow implementation on bigendian" >&5
printf "%s\n" "$as_me: WARNING: Using SHA3 slow implementation on bigendian" >&2;}
  SHA3_DIR=

else case e in #(
  e)
  # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
printf %s "checking size of long... " >&6; }
if test ${ac_cv_sizeof_long+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_long" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
printf "%s\n" "$ac_cv_sizeof_long" >&6; }



printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're at 64-bit platform" >&5
printf %s "checking if we're at 64-bit platform... " >&6; }
  if test "$ac_cv_sizeof_long" -eq 4
then :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
    SHA3_DIR="sha3/generic32lc"
    SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-inplace32BI.c"
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wno-implicit-fallthrough" >&5
printf %s "checking whether the C compiler accepts -Wno-implicit-fallthrough... " >&6; }
if test ${ax_cv_check_cflags___Wno_implicit_fallthrough+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wno-implicit-fallthrough $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wno_implicit_fallthrough=yes
else case e in #(
  e) ax_cv_check_cflags___Wno_implicit_fallthrough=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_implicit_fallthrough" >&5
printf "%s\n" "$ax_cv_check_cflags___Wno_implicit_fallthrough" >&6; }
if test "x$ax_cv_check_cflags___Wno_implicit_fallthrough" = xyes
then :
  PHP_HASH_CFLAGS="$PHP_HASH_CFLAGS -Wno-implicit-fallthrough"
else case e in #(
  e) : ;;
esac
fi


else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
    SHA3_DIR="sha3/generic64lc"
    SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-opt64.c"
   ;;
esac
fi
  EXT_HASH_SHA3_SOURCES="$SHA3_OPT_SRC $SHA3_DIR/KeccakHash.c $SHA3_DIR/KeccakSponge.c"
  PHP_HASH_CFLAGS="$PHP_HASH_CFLAGS -I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded"
 ;;
esac
fi


  ext_builddir=ext/hash
  ext_srcdir=$abs_srcdir/ext/hash
  ext_dir=ext/hash

  ac_extra=$(echo "$PHP_HASH_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_HASH_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $EXT_HASH_SHA3_SOURCES hash_adler32.c hash_crc32.c hash_fnv.c hash_gost.c hash_haval.c hash_joaat.c hash_md.c hash_murmur.c hash_ripemd.c hash_sha_ni.c hash_sha_sse2.c hash_sha.c hash_sha3.c hash_snefru.c hash_tiger.c hash_whirlpool.c hash_xxhash.c hash.c murmur/PMurHash.c murmur/PMurHash128.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC hash;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC hash;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_HASH_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in $EXT_HASH_SHA3_SOURCES hash_adler32.c hash_crc32.c hash_fnv.c hash_gost.c hash_haval.c hash_joaat.c hash_md.c hash_murmur.c hash_ripemd.c hash_sha_ni.c hash_sha_sse2.c hash_sha.c hash_sha3.c hash_snefru.c hash_tiger.c hash_whirlpool.c hash_xxhash.c hash.c murmur/PMurHash.c murmur/PMurHash128.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_hash="$shared_objects_hash $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/hash.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/hash.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_hash"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/hash.$suffix: $ext_builddir/hash.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/hash.$suffix \$(phplibdir)

$ext_builddir/hash.$suffix: \$(shared_objects_hash) \$(HASH_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_hash) \$(HASH_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_HASH 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_HASH_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $EXT_HASH_SHA3_SOURCES hash_adler32.c hash_crc32.c hash_fnv.c hash_gost.c hash_haval.c hash_joaat.c hash_md.c hash_murmur.c hash_ripemd.c hash_sha_ni.c hash_sha_sse2.c hash_sha.c hash_sha3.c hash_snefru.c hash_tiger.c hash_whirlpool.c hash_xxhash.c hash.c murmur/PMurHash.c murmur/PMurHash128.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC hash;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $EXT_HASH_SHA3_SOURCES hash_adler32.c hash_crc32.c hash_fnv.c hash_gost.c hash_haval.c hash_joaat.c hash_md.c hash_murmur.c hash_ripemd.c hash_sha_ni.c hash_sha_sse2.c hash_sha.c hash_sha3.c hash_snefru.c hash_tiger.c hash_whirlpool.c hash_xxhash.c hash.c murmur/PMurHash.c murmur/PMurHash128.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC hash;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=hash

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

as_fn_append BUILD_DIR " $ext_builddir/murmur"

if ${SHA3_DIR:+false} :
then :

else case e in #(
  e) as_fn_append BUILD_DIR " $ext_builddir/$SHA3_DIR"
 ;;
esac
fi

    header_path=ext/hash
    for header_file in php_hash_adler32.h php_hash_crc32.h php_hash_fnv.h php_hash_gost.h php_hash_haval.h php_hash_joaat.h php_hash_md.h php_hash_murmur.h php_hash_ripemd.h php_hash_sha.h php_hash_sha3.h php_hash_snefru.h php_hash_tiger.h php_hash_whirlpool.h php_hash_xxhash.h php_hash.h xxhash/xxhash.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done







php_with_iconv=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv support" >&5
printf %s "checking for iconv support... " >&6; }

# Check whether --with-iconv was given.
if test ${with_iconv+y}
then :
  withval=$with_iconv; PHP_ICONV=$withval
else case e in #(
  e)
  PHP_ICONV=yes
  test "$PHP_ENABLE_ALL" && PHP_ICONV=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_ICONV in
shared,*)
  PHP_ICONV=$(echo "$PHP_ICONV"|$SED 's/^shared,//')
  ;;
shared)
  PHP_ICONV=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_ICONV" != "no"; then

  found_iconv=no
  unset ICONV_DIR


    if test "x$PHP_ICONV" = xyes
then :

        LIBS_save=$LIBS
    LIBS=
    ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
if test "x$ac_cv_func_iconv" = xyes
then :
  found_iconv=yes
else case e in #(
  e) ac_fn_c_check_func "$LINENO" "libiconv" "ac_cv_func_libiconv"
if test "x$ac_cv_func_libiconv" = xyes
then :

        printf "%s\n" "#define HAVE_LIBICONV 1" >>confdefs.h

        found_iconv=yes

fi
 ;;
esac
fi

    LIBS=$LIBS_save

fi

    if test "x$found_iconv" = xno
then :


        php_brew_prefix=no
    # Extract the first word of "brew", so it can be a program name with args.
set dummy brew; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_BREW+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$BREW"; then
  ac_cv_prog_BREW="$BREW" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_BREW="brew"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
BREW=$ac_cv_prog_BREW
if test -n "$BREW"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5
printf "%s\n" "$BREW" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    if test -n "$BREW"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for homebrew prefix" >&5
printf %s "checking for homebrew prefix... " >&6; }
      php_brew_prefix=$($BREW --prefix 2> /dev/null)
    fi

    for i in $PHP_ICONV $php_brew_prefix/opt/libiconv /usr/local /usr; do
      if test -r $i/include/gnu-libiconv/iconv.h; then
        ICONV_DIR=$i
        ICONV_INCLUDE_DIR=$i/include/gnu-libiconv
        iconv_lib_name=iconv
        break
      elif test -r $i/include/iconv.h; then
        ICONV_DIR=$i
        ICONV_INCLUDE_DIR=$i/include
        iconv_lib_name=iconv
        break
      fi
    done

    if ${ICONV_DIR:+false} :
then :
  as_fn_error $? "Please specify the install prefix of iconv with --with-iconv=<DIR>" "$LINENO" 5
fi

    if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
       test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME ||
       test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.tbd
    then

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$ICONV_DIR/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$iconv_lib_name""_libiconv" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libiconv in -l$iconv_lib_name" >&5
printf %s "checking for libiconv in -l$iconv_lib_name... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$iconv_lib_name  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char libiconv (void);
int
main (void)
{
return libiconv ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

        found_iconv=yes
        printf "%s\n" "#define HAVE_LIBICONV 1" >>confdefs.h


printf "%s\n" "#define ICONV_ALIASED_LIBICONV 1" >>confdefs.h



else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$iconv_lib_name_libiconv

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$ICONV_DIR/$PHP_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$iconv_lib_name""_iconv" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv in -l$iconv_lib_name" >&5
printf %s "checking for iconv in -l$iconv_lib_name... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$iconv_lib_name  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char iconv (void);
int
main (void)
{
return iconv ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    found_iconv=yes

else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$iconv_lib_name_iconv

   ;;
esac
fi

   ;;
esac
fi

    fi

fi

  if test "$found_iconv" = "yes"; then
    if test -n "$ICONV_DIR"; then


  if test "$ext_shared" = "yes"; then
    ICONV_SHARED_LIBADD="-l$iconv_lib_name $ICONV_SHARED_LIBADD"
    if test -n "$ICONV_DIR/$PHP_LIBDIR"; then

  if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$ICONV_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ICONV_DIR/$PHP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        ICONV_SHARED_LIBADD="-L$ai_p $ICONV_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && ICONV_SHARED_LIBADD="$ld_runpath_switch$ai_p $ICONV_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$ICONV_DIR/$PHP_LIBDIR"; then

  if test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ICONV_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$ICONV_DIR/$PHP_LIBDIR" || echo "$ICONV_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$ICONV_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $ICONV_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ICONV_DIR/$PHP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $iconv_lib_name in
  c|c_r) ;;
  *)
      LIBS="-l$iconv_lib_name $LIBS"
   ;;
  esac




  fi



for include_path in $ICONV_INCLUDE_DIR; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    fi

else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The iconv not found.
See 'config.log' for more details" "$LINENO" 5; }
  fi


  save_LIBS=$LIBS
  save_CFLAGS=$CFLAGS
  LIBS="$LIBS $ICONV_SHARED_LIBADD"
  CFLAGS="$INCLUDES $CFLAGS"

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv implementation" >&5
printf %s "checking for iconv implementation... " >&6; }
if test ${php_cv_iconv_implementation+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <gnu/libc-version.h>
int
main (void)
{
gnu_get_libc_version();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_iconv_implementation=glibc
else case e in #(
  e) php_cv_iconv_implementation=unknown ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

    if test "x$php_cv_iconv_implementation" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <iconv.h>
int
main (void)
{
(void) _libiconv_version
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_iconv_implementation="GNU libiconv"
else case e in #(
  e) php_cv_iconv_implementation=unknown ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi

        if test "x$php_cv_iconv_implementation" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <iconv.h>
int
main (void)
{
iconv_ccs_init(NULL, NULL);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_iconv_implementation=BSD
else case e in #(
  e) php_cv_iconv_implementation=unknown ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi

    if test "x$php_cv_iconv_implementation" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <iconv.h>
int
main (void)
{
cstoccsid("");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_iconv_implementation=IBM
else case e in #(
  e) php_cv_iconv_implementation=unknown ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_iconv_implementation" >&5
printf "%s\n" "$php_cv_iconv_implementation" >&6; }



  case $php_cv_iconv_implementation in #(
  glibc) :


printf "%s\n" "#define HAVE_GLIBC_ICONV 1" >>confdefs.h

      printf "%s\n" "#define PHP_ICONV_IMPL \"glibc\"" >>confdefs.h

     ;; #(
  "GNU libiconv") :

      printf "%s\n" "#define PHP_ICONV_IMPL \"libiconv\"" >>confdefs.h

      printf "%s\n" "#define HAVE_LIBICONV 1" >>confdefs.h

     ;; #(
  BSD) :
    printf "%s\n" "#define PHP_ICONV_IMPL \"BSD iconv\"" >>confdefs.h
 ;; #(
  IBM) :


printf "%s\n" "#define HAVE_IBM_ICONV 1" >>confdefs.h

      printf "%s\n" "#define PHP_ICONV_IMPL \"IBM iconv\"" >>confdefs.h

     ;; #(
  *) :
     ;;
esac

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if iconv supports errno" >&5
printf %s "checking if iconv supports errno... " >&6; }
if test ${php_cv_iconv_errno+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_iconv_errno=yes
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <iconv.h>
#include <errno.h>

int main(void) {
  iconv_t cd;
  cd = iconv_open( "*blahblah*", "*blahblahblah*" );
  if (cd == (iconv_t)(-1)) {
    if (errno == EINVAL) {
      return 0;
  } else {
      return 1;
    }
  }
  iconv_close( cd );
  return 2;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_iconv_errno=yes
else case e in #(
  e) php_cv_iconv_errno=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_iconv_errno" >&5
printf "%s\n" "$php_cv_iconv_errno" >&6; }
  if test "x$php_cv_iconv_errno" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The iconv check failed, 'errno' is missing.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if iconv input parameter is const (non-standard)" >&5
printf %s "checking if iconv input parameter is const (non-standard)... " >&6; }
if test ${php_cv_iconv_const+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <iconv.h>

size_t iconv(iconv_t cd, const char **src, size_t *srcleft, char **dst, size_t *dstleft);

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_iconv_const=const
else case e in #(
  e) php_cv_iconv_const=non-const ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_iconv_const" >&5
printf "%s\n" "$php_cv_iconv_const" >&6; }
    if test "x$php_cv_iconv_const" = xnon-const
then :
  php_cv_iconv_const=
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if iconv supports //IGNORE" >&5
printf %s "checking if iconv supports //IGNORE... " >&6; }
if test ${php_cv_iconv_ignore+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_iconv_ignore=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <iconv.h>
#include <stdlib.h>

int main(void) {
  iconv_t cd = iconv_open( "UTF-8//IGNORE", "UTF-8" );
  if(cd == (iconv_t)-1) {
    return 1;
  }
  char *in_p = "\xC3\xC3\xC3\xB8";
  size_t in_left = 4, out_left = 4096;
  char *out = malloc(out_left);
  char *out_p = out;
  size_t result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left);
  if(result == (size_t)-1) {
    return 1;
  }
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_iconv_ignore=yes
else case e in #(
  e) php_cv_iconv_ignore=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_iconv_ignore" >&5
printf "%s\n" "$php_cv_iconv_ignore" >&6; }
  if test "x$php_cv_iconv_ignore" = xno
then :

printf "%s\n" "#define ICONV_BROKEN_IGNORE 1" >>confdefs.h

fi

  LIBS=$save_LIBS
  CFLAGS=$save_CFLAGS


printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h



  ext_builddir=ext/iconv
  ext_srcdir=$abs_srcdir/ext/iconv
  ext_dir=ext/iconv

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DICONV_CONST=$php_cv_iconv_const"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_ICONV_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in iconv.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC iconv;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC iconv;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_ICONV_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in iconv.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_iconv="$shared_objects_iconv $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/iconv.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/iconv.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_iconv"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/iconv.$suffix: $ext_builddir/iconv.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/iconv.$suffix \$(phplibdir)

$ext_builddir/iconv.$suffix: \$(shared_objects_iconv) \$(ICONV_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_iconv) \$(ICONV_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_ICONV 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_ICONV_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in iconv.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC iconv;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in iconv.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC iconv;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=iconv

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST ICONV_SHARED_LIBADD"


    header_path=ext/iconv
    for header_file in php_iconv.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done


fi





php_enable_intl=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable internationalization support" >&5
printf %s "checking whether to enable internationalization support... " >&6; }
# Check whether --enable-intl was given.
if test ${enable_intl+y}
then :
  enableval=$enable_intl; PHP_INTL=$enableval
else case e in #(
  e)
  PHP_INTL=no
  test "$PHP_ENABLE_ALL" && PHP_INTL=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_INTL in
shared,*)
  PHP_INTL=$(echo "$PHP_INTL"|$SED 's/^shared,//')
  ;;
shared)
  PHP_INTL=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_INTL" != "no"; then


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for icu-uc >= 57.1 icu-io icu-i18n" >&5
printf %s "checking for icu-uc >= 57.1 icu-io icu-i18n... " >&6; }

if test -n "$ICU_CFLAGS"; then
    pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc >= 57.1 icu-io icu-i18n\""; } >&5
  ($PKG_CONFIG --exists --print-errors "icu-uc >= 57.1 icu-io icu-i18n") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc >= 57.1 icu-io icu-i18n" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ICU_LIBS"; then
    pkg_cv_ICU_LIBS="$ICU_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc >= 57.1 icu-io icu-i18n\""; } >&5
  ($PKG_CONFIG --exists --print-errors "icu-uc >= 57.1 icu-io icu-i18n") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc >= 57.1 icu-io icu-i18n" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc >= 57.1 icu-io icu-i18n" 2>&1`
        else
	        ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc >= 57.1 icu-io icu-i18n" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ICU_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (icu-uc >= 57.1 icu-io icu-i18n) were not met:

$ICU_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
	ICU_LIBS=$pkg_cv_ICU_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


  for ac_i in $ICU_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $ICU_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  INTL_SHARED_LIBADD="$INTL_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        INTL_SHARED_LIBADD="$INTL_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        INTL_SHARED_LIBADD="-L$ai_p $INTL_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && INTL_SHARED_LIBADD="$ld_runpath_switch$ai_p $INTL_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
  ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"

  if $PKG_CONFIG icu-io --atleast-version=60
then :
  ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST INTL_SHARED_LIBADD"

  INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"

  ext_builddir=ext/intl
  ext_srcdir=$abs_srcdir/ext/intl
  ext_dir=ext/intl

  ac_extra=$(echo "$INTL_COMMON_FLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_INTL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in collator/collator_attr.c collator/collator_class.c collator/collator_compare.c collator/collator_convert.c collator/collator_create.c collator/collator_error.c collator/collator_is_numeric.c collator/collator_locale.c collator/collator_sort.c common/common_error.c converter/converter.c dateformat/dateformat_attr.c dateformat/dateformat_class.c dateformat/dateformat_data.c dateformat/dateformat_format.c dateformat/dateformat_parse.c dateformat/dateformat.c formatter/formatter_attr.c formatter/formatter_class.c formatter/formatter_data.c formatter/formatter_format.c formatter/formatter_main.c formatter/formatter_parse.c grapheme/grapheme_string.c grapheme/grapheme_util.c intl_convert.c intl_error.c listformatter/listformatter_class.c php_intl.c resourcebundle/resourcebundle_class.c resourcebundle/resourcebundle_iterator.c resourcebundle/resourcebundle.c spoofchecker/spoofchecker_class.c spoofchecker/spoofchecker_create.c spoofchecker/spoofchecker_main.c transliterator/transliterator_class.c transliterator/transliterator_methods.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC intl;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC intl;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_INTL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in collator/collator_attr.c collator/collator_class.c collator/collator_compare.c collator/collator_convert.c collator/collator_create.c collator/collator_error.c collator/collator_is_numeric.c collator/collator_locale.c collator/collator_sort.c common/common_error.c converter/converter.c dateformat/dateformat_attr.c dateformat/dateformat_class.c dateformat/dateformat_data.c dateformat/dateformat_format.c dateformat/dateformat_parse.c dateformat/dateformat.c formatter/formatter_attr.c formatter/formatter_class.c formatter/formatter_data.c formatter/formatter_format.c formatter/formatter_main.c formatter/formatter_parse.c grapheme/grapheme_string.c grapheme/grapheme_util.c intl_convert.c intl_error.c listformatter/listformatter_class.c php_intl.c resourcebundle/resourcebundle_class.c resourcebundle/resourcebundle_iterator.c resourcebundle/resourcebundle.c spoofchecker/spoofchecker_class.c spoofchecker/spoofchecker_create.c spoofchecker/spoofchecker_main.c transliterator/transliterator_class.c transliterator/transliterator_methods.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_intl="$shared_objects_intl $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/intl.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/intl.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_intl"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/intl.$suffix: $ext_builddir/intl.$suffix
	\$(LIBTOOL) --tag=CXX --mode=install cp $ext_builddir/intl.$suffix \$(phplibdir)

$ext_builddir/intl.$suffix: \$(shared_objects_intl) \$(INTL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CXX --mode=link \$(CXX) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_intl) \$(INTL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_INTL 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_INTL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in collator/collator_attr.c collator/collator_class.c collator/collator_compare.c collator/collator_convert.c collator/collator_create.c collator/collator_error.c collator/collator_is_numeric.c collator/collator_locale.c collator/collator_sort.c common/common_error.c converter/converter.c dateformat/dateformat_attr.c dateformat/dateformat_class.c dateformat/dateformat_data.c dateformat/dateformat_format.c dateformat/dateformat_parse.c dateformat/dateformat.c formatter/formatter_attr.c formatter/formatter_class.c formatter/formatter_data.c formatter/formatter_format.c formatter/formatter_main.c formatter/formatter_parse.c grapheme/grapheme_string.c grapheme/grapheme_util.c intl_convert.c intl_error.c listformatter/listformatter_class.c php_intl.c resourcebundle/resourcebundle_class.c resourcebundle/resourcebundle_iterator.c resourcebundle/resourcebundle.c spoofchecker/spoofchecker_class.c spoofchecker/spoofchecker_create.c spoofchecker/spoofchecker_main.c transliterator/transliterator_class.c transliterator/transliterator_methods.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC intl;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in collator/collator_attr.c collator/collator_class.c collator/collator_compare.c collator/collator_convert.c collator/collator_create.c collator/collator_error.c collator/collator_is_numeric.c collator/collator_locale.c collator/collator_sort.c common/common_error.c converter/converter.c dateformat/dateformat_attr.c dateformat/dateformat_class.c dateformat/dateformat_data.c dateformat/dateformat_format.c dateformat/dateformat_parse.c dateformat/dateformat.c formatter/formatter_attr.c formatter/formatter_class.c formatter/formatter_data.c formatter/formatter_format.c formatter/formatter_main.c formatter/formatter_parse.c grapheme/grapheme_string.c grapheme/grapheme_util.c intl_convert.c intl_error.c listformatter/listformatter_class.c php_intl.c resourcebundle/resourcebundle_class.c resourcebundle/resourcebundle_iterator.c resourcebundle/resourcebundle.c spoofchecker/spoofchecker_class.c spoofchecker/spoofchecker_create.c spoofchecker/spoofchecker_main.c transliterator/transliterator_class.c transliterator/transliterator_methods.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC intl;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=intl

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \
    common/common_enum.cpp \
    common/common_date.cpp \
    dateformat/dateformat_format_object.cpp \
    dateformat/dateformat_create.cpp \
    dateformat/dateformat_attrcpp.cpp \
    dateformat/dateformat_helpers.cpp \
    dateformat/datepatterngenerator_class.cpp \
    dateformat/datepatterngenerator_methods.cpp \
    msgformat/msgformat_helpers.cpp \
    timezone/timezone_class.cpp \
    timezone/timezone_methods.cpp \
    calendar/calendar_class.cpp \
    calendar/calendar_methods.cpp \
    calendar/gregoriancalendar_methods.cpp \
    msgformat/msgformat_attr.cpp \
    msgformat/msgformat_class.cpp \
    msgformat/msgformat_data.cpp \
    msgformat/msgformat_format.cpp \
    msgformat/msgformat_parse.cpp \
    msgformat/msgformat.cpp \
    normalizer/normalizer_class.cpp \
    normalizer/normalizer_normalize.cpp \
    breakiterator/breakiterator_class.cpp \
    breakiterator/breakiterator_iterators.cpp \
    breakiterator/breakiterator_methods.cpp \
    breakiterator/rulebasedbreakiterator_methods.cpp \
    breakiterator/codepointiterator_internal.cpp \
    breakiterator/codepointiterator_methods.cpp \
    idn/idn.cpp \
    locale/locale_class.cpp \
    locale/locale_methods.cpp \
    locale/locale.cpp \
    uchar/uchar.cpp"


if ${php_cxx_done:+false} :
then :

  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
printf "%s\n" "$CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
printf "%s\n" "$ac_ct_CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
printf %s "checking whether the compiler supports GNU C++... " >&6; }
if test ${ac_cv_cxx_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else case e in #(
  e) ac_compiler_gnu=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+y}
ac_save_CXXFLAGS=$CXXFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
printf %s "checking whether $CXX accepts -g... " >&6; }
if test ${ac_cv_prog_cxx_g+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
else case e in #(
  e) CXXFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :

else case e in #(
  e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
if test $ac_test_CXXFLAGS; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_prog_cxx_stdcxx=no
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx11+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cxx_cxx11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx11_program
_ACEOF
for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX ;;
esac
fi

if test "x$ac_cv_prog_cxx_cxx11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cxx_cxx11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx11" ;;
esac
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
  ac_prog_cxx_stdcxx=cxx11 ;;
esac
fi
fi
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx98+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cxx_cxx98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx98_program
_ACEOF
for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx98=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX ;;
esac
fi

if test "x$ac_cv_prog_cxx_cxx98" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cxx_cxx98" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx98" ;;
esac
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
  ac_prog_cxx_stdcxx=cxx98 ;;
esac
fi
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
printf %s "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
  if test ${ac_cv_prog_CXXCPP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)     # Double quotes because $CXX needs to be expanded
    for CXXCPP in "$CXX -E" cpp /lib/cpp
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
  break
fi

    done
    ac_cv_prog_CXXCPP=$CXXCPP
   ;;
esac
fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
printf "%s\n" "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu



  case stdc++ in
  c|c_r) ;;
  *)
      LIBS="-lstdc++ $LIBS"
   ;;
  esac


  php_cxx_done=yes

fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if intl requires -std=gnu++17" >&5
printf %s "checking if intl requires -std=gnu++17... " >&6; }

if $PKG_CONFIG icu-uc --atleast-version=74
then :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
      ax_cxx_compile_alternatives="17 1z"  ax_cxx_compile_cxx17_required=true  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  ac_success=no

        for alternative in ${ax_cxx_compile_alternatives}; do
    for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
      cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx17_$switch" | sed "$as_sed_sh"`
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
printf %s "checking whether $CXX supports C++17 features with $switch... " >&6; }
if eval test \${$cachevar+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_save_CXX="$CXX"
           CXX="$CXX $switch"
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.

#ifndef __cplusplus

#error "This is not a C++ compiler"

#elif __cplusplus < 201103L

#error "This is not a C++11 compiler"

#else

namespace cxx11
{

  namespace test_static_assert
  {

    template <typename T>
    struct check
    {
      static_assert(sizeof(int) <= sizeof(T), "not big enough");
    };

  }

  namespace test_final_override
  {

    struct Base
    {
      virtual ~Base() {}
      virtual void f() {}
    };

    struct Derived : public Base
    {
      virtual ~Derived() override {}
      virtual void f() override {}
    };

  }

  namespace test_double_right_angle_brackets
  {

    template < typename T >
    struct check {};

    typedef check<void> single_type;
    typedef check<check<void>> double_type;
    typedef check<check<check<void>>> triple_type;
    typedef check<check<check<check<void>>>> quadruple_type;

  }

  namespace test_decltype
  {

    int
    f()
    {
      int a = 1;
      decltype(a) b = 2;
      return a + b;
    }

  }

  namespace test_type_deduction
  {

    template < typename T1, typename T2 >
    struct is_same
    {
      static const bool value = false;
    };

    template < typename T >
    struct is_same<T, T>
    {
      static const bool value = true;
    };

    template < typename T1, typename T2 >
    auto
    add(T1 a1, T2 a2) -> decltype(a1 + a2)
    {
      return a1 + a2;
    }

    int
    test(const int c, volatile int v)
    {
      static_assert(is_same<int, decltype(0)>::value == true, "");
      static_assert(is_same<int, decltype(c)>::value == false, "");
      static_assert(is_same<int, decltype(v)>::value == false, "");
      auto ac = c;
      auto av = v;
      auto sumi = ac + av + 'x';
      auto sumf = ac + av + 1.0;
      static_assert(is_same<int, decltype(ac)>::value == true, "");
      static_assert(is_same<int, decltype(av)>::value == true, "");
      static_assert(is_same<int, decltype(sumi)>::value == true, "");
      static_assert(is_same<int, decltype(sumf)>::value == false, "");
      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
      return (sumf > 0.0) ? sumi : add(c, v);
    }

  }

  namespace test_noexcept
  {

    int f() { return 0; }
    int g() noexcept { return 0; }

    static_assert(noexcept(f()) == false, "");
    static_assert(noexcept(g()) == true, "");

  }

  namespace test_constexpr
  {

    template < typename CharT >
    unsigned long constexpr
    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
    {
      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
    }

    template < typename CharT >
    unsigned long constexpr
    strlen_c(const CharT *const s) noexcept
    {
      return strlen_c_r(s, 0UL);
    }

    static_assert(strlen_c("") == 0UL, "");
    static_assert(strlen_c("1") == 1UL, "");
    static_assert(strlen_c("example") == 7UL, "");
    static_assert(strlen_c("another\0example") == 7UL, "");

  }

  namespace test_rvalue_references
  {

    template < int N >
    struct answer
    {
      static constexpr int value = N;
    };

    answer<1> f(int&)       { return answer<1>(); }
    answer<2> f(const int&) { return answer<2>(); }
    answer<3> f(int&&)      { return answer<3>(); }

    void
    test()
    {
      int i = 0;
      const int c = 0;
      static_assert(decltype(f(i))::value == 1, "");
      static_assert(decltype(f(c))::value == 2, "");
      static_assert(decltype(f(0))::value == 3, "");
    }

  }

  namespace test_uniform_initialization
  {

    struct test
    {
      static const int zero {};
      static const int one {1};
    };

    static_assert(test::zero == 0, "");
    static_assert(test::one == 1, "");

  }

  namespace test_lambdas
  {

    void
    test1()
    {
      auto lambda1 = [](){};
      auto lambda2 = lambda1;
      lambda1();
      lambda2();
    }

    int
    test2()
    {
      auto a = [](int i, int j){ return i + j; }(1, 2);
      auto b = []() -> int { return '0'; }();
      auto c = [=](){ return a + b; }();
      auto d = [&](){ return c; }();
      auto e = [a, &b](int x) mutable {
        const auto identity = [](int y){ return y; };
        for (auto i = 0; i < a; ++i)
          a += b--;
        return x + identity(a + b);
      }(0);
      return a + b + c + d + e;
    }

    int
    test3()
    {
      const auto nullary = [](){ return 0; };
      const auto unary = [](int x){ return x; };
      using nullary_t = decltype(nullary);
      using unary_t = decltype(unary);
      const auto higher1st = [](nullary_t f){ return f(); };
      const auto higher2nd = [unary](nullary_t f1){
        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
      };
      return higher1st(nullary) + higher2nd(nullary)(unary);
    }

  }

  namespace test_variadic_templates
  {

    template <int...>
    struct sum;

    template <int N0, int... N1toN>
    struct sum<N0, N1toN...>
    {
      static constexpr auto value = N0 + sum<N1toN...>::value;
    };

    template <>
    struct sum<>
    {
      static constexpr auto value = 0;
    };

    static_assert(sum<>::value == 0, "");
    static_assert(sum<1>::value == 1, "");
    static_assert(sum<23>::value == 23, "");
    static_assert(sum<1, 2>::value == 3, "");
    static_assert(sum<5, 5, 11>::value == 21, "");
    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");

  }

  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
  // because of this.
  namespace test_template_alias_sfinae
  {

    struct foo {};

    template<typename T>
    using member = typename T::member_type;

    template<typename T>
    void func(...) {}

    template<typename T>
    void func(member<T>*) {}

    void test();

    void test() { func<foo>(0); }

  }

}  // namespace cxx11

#endif  // __cplusplus >= 201103L




// If the compiler admits that it is not ready for C++14, why torture it?
// Hopefully, this will speed up the test.

#ifndef __cplusplus

#error "This is not a C++ compiler"

#elif __cplusplus < 201402L

#error "This is not a C++14 compiler"

#else

namespace cxx14
{

  namespace test_polymorphic_lambdas
  {

    int
    test()
    {
      const auto lambda = [](auto&&... args){
        const auto istiny = [](auto x){
          return (sizeof(x) == 1UL) ? 1 : 0;
        };
        const int aretiny[] = { istiny(args)... };
        return aretiny[0];
      };
      return lambda(1, 1L, 1.0f, '1');
    }

  }

  namespace test_binary_literals
  {

    constexpr auto ivii = 0b0000000000101010;
    static_assert(ivii == 42, "wrong value");

  }

  namespace test_generalized_constexpr
  {

    template < typename CharT >
    constexpr unsigned long
    strlen_c(const CharT *const s) noexcept
    {
      auto length = 0UL;
      for (auto p = s; *p; ++p)
        ++length;
      return length;
    }

    static_assert(strlen_c("") == 0UL, "");
    static_assert(strlen_c("x") == 1UL, "");
    static_assert(strlen_c("test") == 4UL, "");
    static_assert(strlen_c("another\0test") == 7UL, "");

  }

  namespace test_lambda_init_capture
  {

    int
    test()
    {
      auto x = 0;
      const auto lambda1 = [a = x](int b){ return a + b; };
      const auto lambda2 = [a = lambda1(x)](){ return a; };
      return lambda2();
    }

  }

  namespace test_digit_separators
  {

    constexpr auto ten_million = 100'000'000;
    static_assert(ten_million == 100000000, "");

  }

  namespace test_return_type_deduction
  {

    auto f(int& x) { return x; }
    decltype(auto) g(int& x) { return x; }

    template < typename T1, typename T2 >
    struct is_same
    {
      static constexpr auto value = false;
    };

    template < typename T >
    struct is_same<T, T>
    {
      static constexpr auto value = true;
    };

    int
    test()
    {
      auto x = 0;
      static_assert(is_same<int, decltype(f(x))>::value, "");
      static_assert(is_same<int&, decltype(g(x))>::value, "");
      return x;
    }

  }

}  // namespace cxx14

#endif  // __cplusplus >= 201402L




// If the compiler admits that it is not ready for C++17, why torture it?
// Hopefully, this will speed up the test.

#ifndef __cplusplus

#error "This is not a C++ compiler"

#elif __cplusplus < 201703L

#error "This is not a C++17 compiler"

#else

#include <initializer_list>
#include <utility>
#include <type_traits>

namespace cxx17
{

  namespace test_constexpr_lambdas
  {

    constexpr int foo = [](){return 42;}();

  }

  namespace test::nested_namespace::definitions
  {

  }

  namespace test_fold_expression
  {

    template<typename... Args>
    int multiply(Args... args)
    {
      return (args * ... * 1);
    }

    template<typename... Args>
    bool all(Args... args)
    {
      return (args && ...);
    }

  }

  namespace test_extended_static_assert
  {

    static_assert (true);

  }

  namespace test_auto_brace_init_list
  {

    auto foo = {5};
    auto bar {5};

    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
    static_assert(std::is_same<int, decltype(bar)>::value);
  }

  namespace test_typename_in_template_template_parameter
  {

    template<template<typename> typename X> struct D;

  }

  namespace test_fallthrough_nodiscard_maybe_unused_attributes
  {

    int f1()
    {
      return 42;
    }

    [[nodiscard]] int f2()
    {
      [[maybe_unused]] auto unused = f1();

      switch (f1())
      {
      case 17:
        f1();
        [[fallthrough]];
      case 42:
        f1();
      }
      return f1();
    }

  }

  namespace test_extended_aggregate_initialization
  {

    struct base1
    {
      int b1, b2 = 42;
    };

    struct base2
    {
      base2() {
        b3 = 42;
      }
      int b3;
    };

    struct derived : base1, base2
    {
        int d;
    };

    derived d1 {{1, 2}, {}, 4};  // full initialization
    derived d2 {{}, {}, 4};      // value-initialized bases

  }

  namespace test_general_range_based_for_loop
  {

    struct iter
    {
      int i;

      int& operator* ()
      {
        return i;
      }

      const int& operator* () const
      {
        return i;
      }

      iter& operator++()
      {
        ++i;
        return *this;
      }
    };

    struct sentinel
    {
      int i;
    };

    bool operator== (const iter& i, const sentinel& s)
    {
      return i.i == s.i;
    }

    bool operator!= (const iter& i, const sentinel& s)
    {
      return !(i == s);
    }

    struct range
    {
      iter begin() const
      {
        return {0};
      }

      sentinel end() const
      {
        return {5};
      }
    };

    void f()
    {
      range r {};

      for (auto i : r)
      {
        [[maybe_unused]] auto v = i;
      }
    }

  }

  namespace test_lambda_capture_asterisk_this_by_value
  {

    struct t
    {
      int i;
      int foo()
      {
        return [*this]()
        {
          return i;
        }();
      }
    };

  }

  namespace test_enum_class_construction
  {

    enum class byte : unsigned char
    {};

    byte foo {42};

  }

  namespace test_constexpr_if
  {

    template <bool cond>
    int f ()
    {
      if constexpr(cond)
      {
        return 13;
      }
      else
      {
        return 42;
      }
    }

  }

  namespace test_selection_statement_with_initializer
  {

    int f()
    {
      return 13;
    }

    int f2()
    {
      if (auto i = f(); i > 0)
      {
        return 3;
      }

      switch (auto i = f(); i + 4)
      {
      case 17:
        return 2;

      default:
        return 1;
      }
    }

  }

  namespace test_template_argument_deduction_for_class_templates
  {

    template <typename T1, typename T2>
    struct pair
    {
      pair (T1 p1, T2 p2)
        : m1 {p1},
          m2 {p2}
      {}

      T1 m1;
      T2 m2;
    };

    void f()
    {
      [[maybe_unused]] auto p = pair{13, 42u};
    }

  }

  namespace test_non_type_auto_template_parameters
  {

    template <auto n>
    struct B
    {};

    B<5> b1;
    B<'a'> b2;

  }

  namespace test_structured_bindings
  {

    int arr[2] = { 1, 2 };
    std::pair<int, int> pr = { 1, 2 };

    auto f1() -> int(&)[2]
    {
      return arr;
    }

    auto f2() -> std::pair<int, int>&
    {
      return pr;
    }

    struct S
    {
      int x1 : 2;
      volatile double y1;
    };

    S f3()
    {
      return {};
    }

    auto [ x1, y1 ] = f1();
    auto& [ xr1, yr1 ] = f1();
    auto [ x2, y2 ] = f2();
    auto& [ xr2, yr2 ] = f2();
    const auto [ x3, y3 ] = f3();

  }

  namespace test_exception_spec_type_system
  {

    struct Good {};
    struct Bad {};

    void g1() noexcept;
    void g2();

    template<typename T>
    Bad
    f(T*, T*);

    template<typename T1, typename T2>
    Good
    f(T1*, T2*);

    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);

  }

  namespace test_inline_variables
  {

    template<class T> void f(T)
    {}

    template<class T> inline T g(T)
    {
      return T{};
    }

    template<> inline void f<>(int)
    {}

    template<> int g<>(int)
    {
      return 5;
    }

  }

}  // namespace cxx17

#endif  // __cplusplus < 201703L



_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  eval $cachevar=yes
else case e in #(
  e) eval $cachevar=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
           CXX="$ac_save_CXX" ;;
esac
fi
eval ac_res=\$$cachevar
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
      if eval test x\$$cachevar = xyes; then
        eval PHP_INTL_STDCXX="$switch"
        ac_success=yes
        break
      fi
    done
    if test x$ac_success = xyes; then
      break
    fi
  done

  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

  if test x$ax_cxx_compile_cxx17_required = xtrue; then
    if test x$ac_success = xno; then
      as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
    fi
  fi
  if test x$ac_success = xno; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
printf "%s\n" "$as_me: No compiler with C++17 support was found" >&6;}
  fi



else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
      ax_cxx_compile_alternatives="11 0x"  ax_cxx_compile_cxx11_required=true  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  ac_success=no

        for alternative in ${ax_cxx_compile_alternatives}; do
    for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
      cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | sed "$as_sed_sh"`
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; }
if eval test \${$cachevar+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_save_CXX="$CXX"
           CXX="$CXX $switch"
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.

#ifndef __cplusplus

#error "This is not a C++ compiler"

#elif __cplusplus < 201103L

#error "This is not a C++11 compiler"

#else

namespace cxx11
{

  namespace test_static_assert
  {

    template <typename T>
    struct check
    {
      static_assert(sizeof(int) <= sizeof(T), "not big enough");
    };

  }

  namespace test_final_override
  {

    struct Base
    {
      virtual ~Base() {}
      virtual void f() {}
    };

    struct Derived : public Base
    {
      virtual ~Derived() override {}
      virtual void f() override {}
    };

  }

  namespace test_double_right_angle_brackets
  {

    template < typename T >
    struct check {};

    typedef check<void> single_type;
    typedef check<check<void>> double_type;
    typedef check<check<check<void>>> triple_type;
    typedef check<check<check<check<void>>>> quadruple_type;

  }

  namespace test_decltype
  {

    int
    f()
    {
      int a = 1;
      decltype(a) b = 2;
      return a + b;
    }

  }

  namespace test_type_deduction
  {

    template < typename T1, typename T2 >
    struct is_same
    {
      static const bool value = false;
    };

    template < typename T >
    struct is_same<T, T>
    {
      static const bool value = true;
    };

    template < typename T1, typename T2 >
    auto
    add(T1 a1, T2 a2) -> decltype(a1 + a2)
    {
      return a1 + a2;
    }

    int
    test(const int c, volatile int v)
    {
      static_assert(is_same<int, decltype(0)>::value == true, "");
      static_assert(is_same<int, decltype(c)>::value == false, "");
      static_assert(is_same<int, decltype(v)>::value == false, "");
      auto ac = c;
      auto av = v;
      auto sumi = ac + av + 'x';
      auto sumf = ac + av + 1.0;
      static_assert(is_same<int, decltype(ac)>::value == true, "");
      static_assert(is_same<int, decltype(av)>::value == true, "");
      static_assert(is_same<int, decltype(sumi)>::value == true, "");
      static_assert(is_same<int, decltype(sumf)>::value == false, "");
      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
      return (sumf > 0.0) ? sumi : add(c, v);
    }

  }

  namespace test_noexcept
  {

    int f() { return 0; }
    int g() noexcept { return 0; }

    static_assert(noexcept(f()) == false, "");
    static_assert(noexcept(g()) == true, "");

  }

  namespace test_constexpr
  {

    template < typename CharT >
    unsigned long constexpr
    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
    {
      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
    }

    template < typename CharT >
    unsigned long constexpr
    strlen_c(const CharT *const s) noexcept
    {
      return strlen_c_r(s, 0UL);
    }

    static_assert(strlen_c("") == 0UL, "");
    static_assert(strlen_c("1") == 1UL, "");
    static_assert(strlen_c("example") == 7UL, "");
    static_assert(strlen_c("another\0example") == 7UL, "");

  }

  namespace test_rvalue_references
  {

    template < int N >
    struct answer
    {
      static constexpr int value = N;
    };

    answer<1> f(int&)       { return answer<1>(); }
    answer<2> f(const int&) { return answer<2>(); }
    answer<3> f(int&&)      { return answer<3>(); }

    void
    test()
    {
      int i = 0;
      const int c = 0;
      static_assert(decltype(f(i))::value == 1, "");
      static_assert(decltype(f(c))::value == 2, "");
      static_assert(decltype(f(0))::value == 3, "");
    }

  }

  namespace test_uniform_initialization
  {

    struct test
    {
      static const int zero {};
      static const int one {1};
    };

    static_assert(test::zero == 0, "");
    static_assert(test::one == 1, "");

  }

  namespace test_lambdas
  {

    void
    test1()
    {
      auto lambda1 = [](){};
      auto lambda2 = lambda1;
      lambda1();
      lambda2();
    }

    int
    test2()
    {
      auto a = [](int i, int j){ return i + j; }(1, 2);
      auto b = []() -> int { return '0'; }();
      auto c = [=](){ return a + b; }();
      auto d = [&](){ return c; }();
      auto e = [a, &b](int x) mutable {
        const auto identity = [](int y){ return y; };
        for (auto i = 0; i < a; ++i)
          a += b--;
        return x + identity(a + b);
      }(0);
      return a + b + c + d + e;
    }

    int
    test3()
    {
      const auto nullary = [](){ return 0; };
      const auto unary = [](int x){ return x; };
      using nullary_t = decltype(nullary);
      using unary_t = decltype(unary);
      const auto higher1st = [](nullary_t f){ return f(); };
      const auto higher2nd = [unary](nullary_t f1){
        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
      };
      return higher1st(nullary) + higher2nd(nullary)(unary);
    }

  }

  namespace test_variadic_templates
  {

    template <int...>
    struct sum;

    template <int N0, int... N1toN>
    struct sum<N0, N1toN...>
    {
      static constexpr auto value = N0 + sum<N1toN...>::value;
    };

    template <>
    struct sum<>
    {
      static constexpr auto value = 0;
    };

    static_assert(sum<>::value == 0, "");
    static_assert(sum<1>::value == 1, "");
    static_assert(sum<23>::value == 23, "");
    static_assert(sum<1, 2>::value == 3, "");
    static_assert(sum<5, 5, 11>::value == 21, "");
    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");

  }

  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
  // because of this.
  namespace test_template_alias_sfinae
  {

    struct foo {};

    template<typename T>
    using member = typename T::member_type;

    template<typename T>
    void func(...) {}

    template<typename T>
    void func(member<T>*) {}

    void test();

    void test() { func<foo>(0); }

  }

}  // namespace cxx11

#endif  // __cplusplus >= 201103L



_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  eval $cachevar=yes
else case e in #(
  e) eval $cachevar=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
           CXX="$ac_save_CXX" ;;
esac
fi
eval ac_res=\$$cachevar
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
      if eval test x\$$cachevar = xyes; then
        eval PHP_INTL_STDCXX="$switch"
        ac_success=yes
        break
      fi
    done
    if test x$ac_success = xyes; then
      break
    fi
  done

  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

  if test x$ax_cxx_compile_cxx11_required = xtrue; then
    if test x$ac_success = xno; then
      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
    fi
  fi
  if test x$ac_success = xno; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
printf "%s\n" "$as_me: No compiler with C++11 support was found" >&6;}
  fi


   ;;
esac
fi

  PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS"
  case $host_alias in #(
  *cygwin*) :
    PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L" ;; #(
  *) :
     ;;
esac
  if test "x$ext_shared" = xno
then :


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $PHP_INTL_CXX_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_INTL_CXX_FLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_INTL_CXX_FLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_INTL_CXX_FLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $PHP_INTL_CXX_FLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


else case e in #(
  e)
  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in $PHP_INTL_CXX_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_intl="$shared_objects_intl $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_INTL_CXX_FLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_INTL_CXX_FLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_INTL_CXX_FLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $PHP_INTL_CXX_FLAGS -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done
 ;;
esac
fi

  as_fn_append BUILD_DIR " $ext_builddir/breakiterator $ext_builddir/calendar $ext_builddir/collator $ext_builddir/common $ext_builddir/converter $ext_builddir/dateformat $ext_builddir/formatter $ext_builddir/grapheme $ext_builddir/idn $ext_builddir/locale $ext_builddir/listformatter $ext_builddir/msgformat $ext_builddir/normalizer $ext_builddir/resourcebundle $ext_builddir/spoofchecker $ext_builddir/timezone $ext_builddir/transliterator $ext_builddir/uchar"



  am_i_shared=$PHP_INTL_SHARED
  is_it_shared=$PHP_DATE_SHARED
  is_it_enabled=$PHP_DATE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension intl to build statically, but it
depends on extension date, which you've configured to build shared.
You either need to build intl shared or build date statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension intl, which depends on extension date,
but you've either not enabled date, or have disabled it.
" "$LINENO" 5
  fi

fi





  ext_builddir=ext/json
  ext_srcdir=$abs_srcdir/ext/json
  ext_dir=ext/json

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_JSON_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in json_encoder.c json_parser.tab.c json_scanner.c json.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC json;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC json;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_JSON_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in json_encoder.c json_parser.tab.c json_scanner.c json.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_json="$shared_objects_json $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/json.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/json.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_json"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/json.$suffix: $ext_builddir/json.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/json.$suffix \$(phplibdir)

$ext_builddir/json.$suffix: \$(shared_objects_json) \$(JSON_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_json) \$(JSON_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_JSON 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_JSON_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in json_encoder.c json_parser.tab.c json_scanner.c json.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC json;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in json_encoder.c json_parser.tab.c json_scanner.c json.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC json;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=json

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/json
    for header_file in php_json_parser.h php_json_scanner.h php_json.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done


  src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments








php_with_ldap=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LDAP support" >&5
printf %s "checking for LDAP support... " >&6; }

# Check whether --with-ldap was given.
if test ${with_ldap+y}
then :
  withval=$with_ldap; PHP_LDAP=$withval
else case e in #(
  e)
  PHP_LDAP=no
  test "$PHP_ENABLE_ALL" && PHP_LDAP=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_LDAP in
shared,*)
  PHP_LDAP=$(echo "$PHP_LDAP"|$SED 's/^shared,//')
  ;;
shared)
  PHP_LDAP=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_ldap_sasl=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP Cyrus SASL support" >&5
printf %s "checking whether to build with LDAP Cyrus SASL support... " >&6; }

# Check whether --with-ldap-sasl was given.
if test ${with_ldap_sasl+y}
then :
  withval=$with_ldap_sasl; PHP_LDAP_SASL=$withval
else case e in #(
  e)
  PHP_LDAP_SASL=no

 ;;
esac
fi


ext_output=$PHP_LDAP_SASL
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_LDAP" != "no"; then

  ext_builddir=ext/ldap
  ext_srcdir=$abs_srcdir/ext/ldap
  ext_dir=ext/ldap

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_LDAP_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ldap.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC ldap;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC ldap;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_LDAP_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in ldap.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_ldap="$shared_objects_ldap $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/ldap.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/ldap.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_ldap"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/ldap.$suffix: $ext_builddir/ldap.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/ldap.$suffix \$(phplibdir)

$ext_builddir/ldap.$suffix: \$(shared_objects_ldap) \$(LDAP_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_ldap) \$(LDAP_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_LDAP 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_LDAP_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ldap.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC ldap;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in ldap.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC ldap;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=ldap

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  if test "x$PHP_LDAP" = xyes
then :


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lber ldap" >&5
printf %s "checking for lber ldap... " >&6; }

if test -n "$LDAP_CFLAGS"; then
    pkg_cv_LDAP_CFLAGS="$LDAP_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lber ldap\""; } >&5
  ($PKG_CONFIG --exists --print-errors "lber ldap") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LDAP_CFLAGS=`$PKG_CONFIG --cflags "lber ldap" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LDAP_LIBS"; then
    pkg_cv_LDAP_LIBS="$LDAP_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lber ldap\""; } >&5
  ($PKG_CONFIG --exists --print-errors "lber ldap") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LDAP_LIBS=`$PKG_CONFIG --libs "lber ldap" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LDAP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lber ldap" 2>&1`
        else
	        LDAP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lber ldap" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LDAP_PKG_ERRORS" >&5

	PHP_LDAP_PKGCONFIG=false
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	PHP_LDAP_PKGCONFIG=false
else
	LDAP_CFLAGS=$pkg_cv_LDAP_CFLAGS
	LDAP_LIBS=$pkg_cv_LDAP_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	PHP_LDAP_PKGCONFIG=true
fi
fi

  if test "$PHP_LDAP_PKGCONFIG" = true
then :


  for ac_i in $LDAP_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LDAP_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDAP_SHARED_LIBADD="$LDAP_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="$LDAP_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


else case e in #(
  e)
    if test "x$PHP_LDAP" = xyes
then :

      for i in /usr/local /usr; do

  if test -f $i/include/ldap.h; then
    LDAP_DIR=$i
    LDAP_INCDIR=$i/include
    LDAP_LIBDIR=$i/$PHP_LIBDIR
  elif test -f $i/ldap/public/ldap.h; then
    LDAP_DIR=$i
    LDAP_INCDIR=$i/ldap/public
    LDAP_LIBDIR=$i/$PHP_LIBDIR
  else

            # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
printf %s "checking size of long... " >&6; }
if test ${ac_cv_sizeof_long+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_long" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
printf "%s\n" "$ac_cv_sizeof_long" >&6; }



printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're at 64-bit platform" >&5
printf %s "checking if we're at 64-bit platform... " >&6; }
    if test "$ac_cv_sizeof_long" -eq 4
then :

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
      PHP_OCI8_IC_LIBDIR_SUFFIX=""

else case e in #(
  e)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
      PHP_OCI8_IC_LIBDIR_SUFFIX=64
     ;;
esac
fi

    OCISDKRPMINC=$(echo "$i" | $SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib/*$!/usr/include/oracle/\1/client\2!')

        if test -f $OCISDKRPMINC/ldap.h; then
      LDAP_DIR=$i
      LDAP_INCDIR=$OCISDKRPMINC
      LDAP_LIBDIR=$i
        elif test -f $i/sdk/include/ldap.h; then
      LDAP_DIR=$i
      LDAP_INCDIR=$i/sdk/include
      LDAP_LIBDIR=$i
    fi
  fi
  PHP_LDAP_PKGCONFIG=false

      done

else case e in #(
  e)
  if test -f $PHP_LDAP/include/ldap.h; then
    LDAP_DIR=$PHP_LDAP
    LDAP_INCDIR=$PHP_LDAP/include
    LDAP_LIBDIR=$PHP_LDAP/$PHP_LIBDIR
  elif test -f $PHP_LDAP/ldap/public/ldap.h; then
    LDAP_DIR=$PHP_LDAP
    LDAP_INCDIR=$PHP_LDAP/ldap/public
    LDAP_LIBDIR=$PHP_LDAP/$PHP_LIBDIR
  else

            # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
printf %s "checking size of long... " >&6; }
if test ${ac_cv_sizeof_long+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_long" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
printf "%s\n" "$ac_cv_sizeof_long" >&6; }



printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're at 64-bit platform" >&5
printf %s "checking if we're at 64-bit platform... " >&6; }
    if test "$ac_cv_sizeof_long" -eq 4
then :

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
      PHP_OCI8_IC_LIBDIR_SUFFIX=""

else case e in #(
  e)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
      PHP_OCI8_IC_LIBDIR_SUFFIX=64
     ;;
esac
fi

    OCISDKRPMINC=$(echo "$PHP_LDAP" | $SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib/*$!/usr/include/oracle/\1/client\2!')

        if test -f $OCISDKRPMINC/ldap.h; then
      LDAP_DIR=$PHP_LDAP
      LDAP_INCDIR=$OCISDKRPMINC
      LDAP_LIBDIR=$PHP_LDAP
        elif test -f $PHP_LDAP/sdk/include/ldap.h; then
      LDAP_DIR=$PHP_LDAP
      LDAP_INCDIR=$PHP_LDAP/sdk/include
      LDAP_LIBDIR=$PHP_LDAP
    fi
  fi
  PHP_LDAP_PKGCONFIG=false
 ;;
esac
fi
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5
printf %s "checking for ldap.h... " >&6; }
    if ${LDAP_DIR:+false} :
then :
  as_fn_error $? "Cannot find ldap.h" "$LINENO" 5
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDAP_DIR" >&5
printf "%s\n" "$LDAP_DIR" >&6; } ;;
esac
fi

        MACHINE_INCLUDES=$($CC -dumpmachine | $SED 's/-pc//')



    if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then


  if test "$ext_shared" = "yes"; then
    LDAP_SHARED_LIBADD="-llber $LDAP_SHARED_LIBADD"
    if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case lber in
  c|c_r) ;;
  *)
      LIBS="-llber $LIBS"
   ;;
  esac




  fi




  if test "$ext_shared" = "yes"; then
    LDAP_SHARED_LIBADD="-lldap $LDAP_SHARED_LIBADD"
    if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case ldap in
  c|c_r) ;;
  *)
      LIBS="-lldap $LIBS"
   ;;
  esac




  fi



    elif test -f $LDAP_LIBDIR/libldap.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/libldap.$SHLIB_SUFFIX_NAME.3 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libldap.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libldap.$SHLIB_SUFFIX_NAME.3 || test -f $LDAP_LIBDIR/libldap.3.dylib; then


  if test "$ext_shared" = "yes"; then
    LDAP_SHARED_LIBADD="-lldap $LDAP_SHARED_LIBADD"
    if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case ldap in
  c|c_r) ;;
  *)
      LIBS="-lldap $LIBS"
   ;;
  esac




  fi



    elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.12.1 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME.12.1; then


  if test "$ext_shared" = "yes"; then
    LDAP_SHARED_LIBADD="-lclntsh $LDAP_SHARED_LIBADD"
    if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case clntsh in
  c|c_r) ;;
  *)
      LIBS="-lclntsh $LIBS"
   ;;
  esac




  fi


      printf "%s\n" "#define HAVE_ORALDAP 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Build with Oracle Instant Client is deprecated as of PHP 8.5" >&5
printf "%s\n" "$as_me: WARNING: Build with Oracle Instant Client is deprecated as of PHP 8.5" >&2;}

    elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then


  if test "$ext_shared" = "yes"; then
    LDAP_SHARED_LIBADD="-lclntsh $LDAP_SHARED_LIBADD"
    if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case clntsh in
  c|c_r) ;;
  *)
      LIBS="-lclntsh $LIBS"
   ;;
  esac




  fi


      printf "%s\n" "#define HAVE_ORALDAP 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Build with Oracle Instant Client is deprecated as of PHP 8.5" >&5
printf "%s\n" "$as_me: WARNING: Build with Oracle Instant Client is deprecated as of PHP 8.5" >&2;}

    elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME; then


  if test "$ext_shared" = "yes"; then
    LDAP_SHARED_LIBADD="-lclntsh $LDAP_SHARED_LIBADD"
    if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$LDAP_LIBDIR"; then

  if test "$LDAP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$LDAP_LIBDIR" != "/usr/lib"; then

  if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$LDAP_LIBDIR
  else

    ep_dir=$(echo $LDAP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$LDAP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case clntsh in
  c|c_r) ;;
  *)
      LIBS="-lclntsh $LIBS"
   ;;
  esac




  fi


      printf "%s\n" "#define HAVE_ORALDAP 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Build with Oracle Instant Client is deprecated as of PHP 8.5" >&5
printf "%s\n" "$as_me: WARNING: Build with Oracle Instant Client is deprecated as of PHP 8.5" >&2;}

    else
      as_fn_error $? "Cannot find ldap libraries in $LDAP_LIBDIR." "$LINENO" 5
    fi


for include_path in $LDAP_INCDIR; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


    LDAP_CFLAGS="-I$LDAP_INCDIR"
    LDAP_LIBS=$LDAP_SHARED_LIBADD
   ;;
esac
fi

    _SAVE_CFLAGS=$CFLAGS
  _SAVE_LIBS=$LIBS
  CFLAGS="$CFLAGS $LDAP_CFLAGS"
  LIBS="$LIBS $LDAP_LIBS"

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 3 arg ldap_set_rebind_proc" >&5
printf %s "checking for 3 arg ldap_set_rebind_proc... " >&6; }
if test ${php_cv_have_3arg_setrebindproc+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ldap.h>
int
main (void)
{
ldap_set_rebind_proc(0,0,0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_3arg_setrebindproc=yes
else case e in #(
  e) php_cv_have_3arg_setrebindproc=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_3arg_setrebindproc" >&5
printf "%s\n" "$php_cv_have_3arg_setrebindproc" >&6; }
  if test "x$php_cv_have_3arg_setrebindproc" = xyes
then :

printf "%s\n" "#define HAVE_3ARG_SETREBINDPROC 1" >>confdefs.h

fi

      ac_fn_c_check_func "$LINENO" "ldap_control_find" "ac_cv_func_ldap_control_find"
if test "x$ac_cv_func_ldap_control_find" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_CONTROL_FIND 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_extended_operation" "ac_cv_func_ldap_extended_operation"
if test "x$ac_cv_func_ldap_extended_operation" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_EXTENDED_OPERATION 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_extended_operation_s" "ac_cv_func_ldap_extended_operation_s"
if test "x$ac_cv_func_ldap_extended_operation_s" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_EXTENDED_OPERATION_S 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_parse_extended_result" "ac_cv_func_ldap_parse_extended_result"
if test "x$ac_cv_func_ldap_parse_extended_result" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_PARSE_EXTENDED_RESULT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_parse_reference" "ac_cv_func_ldap_parse_reference"
if test "x$ac_cv_func_ldap_parse_reference" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_PARSE_REFERENCE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_parse_result" "ac_cv_func_ldap_parse_result"
if test "x$ac_cv_func_ldap_parse_result" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_PARSE_RESULT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_passwd" "ac_cv_func_ldap_passwd"
if test "x$ac_cv_func_ldap_passwd" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_PASSWD 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_refresh_s" "ac_cv_func_ldap_refresh_s"
if test "x$ac_cv_func_ldap_refresh_s" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_REFRESH_S 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_start_tls_s" "ac_cv_func_ldap_start_tls_s"
if test "x$ac_cv_func_ldap_start_tls_s" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_START_TLS_S 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "ldap_whoami_s" "ac_cv_func_ldap_whoami_s"
if test "x$ac_cv_func_ldap_whoami_s" = xyes
then :
  printf "%s\n" "#define HAVE_LDAP_WHOAMI_S 1" >>confdefs.h

fi


    ac_fn_c_check_func "$LINENO" "ldap_sasl_bind_s" "ac_cv_func_ldap_sasl_bind_s"
if test "x$ac_cv_func_ldap_sasl_bind_s" = xyes
then :

else case e in #(
  e) ac_fn_c_check_func "$LINENO" "ldap_simple_bind_s" "ac_cv_func_ldap_simple_bind_s"
if test "x$ac_cv_func_ldap_simple_bind_s" = xyes
then :

else case e in #(
  e) as_fn_error $? "LDAP library build check failed." "$LINENO" 5 ;;
esac
fi
 ;;
esac
fi


    CFLAGS=$_SAVE_CFLAGS
  LIBS=$_SAVE_LIBS

    if test "x$PHP_LDAP_SASL" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsasl2" >&5
printf %s "checking for libsasl2... " >&6; }

if test -n "$SASL_CFLAGS"; then
    pkg_cv_SASL_CFLAGS="$SASL_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsasl2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libsasl2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SASL_CFLAGS=`$PKG_CONFIG --cflags "libsasl2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$SASL_LIBS"; then
    pkg_cv_SASL_LIBS="$SASL_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsasl2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libsasl2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SASL_LIBS=`$PKG_CONFIG --libs "libsasl2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        SASL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsasl2" 2>&1`
        else
	        SASL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsasl2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$SASL_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libsasl2) were not met:

$SASL_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SASL_CFLAGS
and SASL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables SASL_CFLAGS
and SASL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	SASL_CFLAGS=$pkg_cv_SASL_CFLAGS
	SASL_LIBS=$pkg_cv_SASL_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $SASL_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $SASL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDAP_SHARED_LIBADD="$LDAP_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="$LDAP_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDAP_SHARED_LIBADD="-L$ai_p $LDAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && LDAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $LDAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


printf "%s\n" "#define HAVE_LDAP_SASL 1" >>confdefs.h

   ;;
esac
fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST LDAP_SHARED_LIBADD"


printf "%s\n" "#define HAVE_LDAP 1" >>confdefs.h

fi




PHP_LEXBOR_CFLAGS="-I@ext_srcdir@/"
LEXBOR_DIR="lexbor"


printf "%s\n" "#define HAVE_LEXBOR 1" >>confdefs.h



  ext_builddir=ext/lexbor
  ext_srcdir=$abs_srcdir/ext/lexbor
  ext_dir=ext/lexbor

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $PHP_LEXBOR_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_LEXBOR_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_lexbor.c $LEXBOR_DIR/core/array_obj.c $LEXBOR_DIR/core/array.c $LEXBOR_DIR/core/avl.c $LEXBOR_DIR/core/bst.c $LEXBOR_DIR/core/conv.c $LEXBOR_DIR/core/diyfp.c $LEXBOR_DIR/core/dobject.c $LEXBOR_DIR/core/dtoa.c $LEXBOR_DIR/core/hash.c $LEXBOR_DIR/core/mem.c $LEXBOR_DIR/core/mraw.c $LEXBOR_DIR/core/plog.c $LEXBOR_DIR/core/print.c $LEXBOR_DIR/core/serialize.c $LEXBOR_DIR/core/shs.c $LEXBOR_DIR/core/str.c $LEXBOR_DIR/core/strtod.c $LEXBOR_DIR/css/at_rule.c $LEXBOR_DIR/css/at_rule/state.c $LEXBOR_DIR/css/blank.c $LEXBOR_DIR/css/css.c $LEXBOR_DIR/css/declaration.c $LEXBOR_DIR/css/log.c $LEXBOR_DIR/css/parser.c $LEXBOR_DIR/css/property.c $LEXBOR_DIR/css/property/state.c $LEXBOR_DIR/css/rule.c $LEXBOR_DIR/css/selectors/pseudo_state.c $LEXBOR_DIR/css/selectors/pseudo.c $LEXBOR_DIR/css/selectors/selector.c $LEXBOR_DIR/css/selectors/selectors.c $LEXBOR_DIR/css/selectors/state.c $LEXBOR_DIR/css/state.c $LEXBOR_DIR/css/stylesheet.c $LEXBOR_DIR/css/syntax/anb.c $LEXBOR_DIR/css/syntax/parser.c $LEXBOR_DIR/css/syntax/state.c $LEXBOR_DIR/css/syntax/syntax.c $LEXBOR_DIR/css/syntax/token.c $LEXBOR_DIR/css/syntax/tokenizer.c $LEXBOR_DIR/css/syntax/tokenizer/error.c $LEXBOR_DIR/css/unit.c $LEXBOR_DIR/css/value.c $LEXBOR_DIR/dom/interface.c $LEXBOR_DIR/dom/interfaces/attr.c $LEXBOR_DIR/dom/interfaces/cdata_section.c $LEXBOR_DIR/dom/interfaces/character_data.c $LEXBOR_DIR/dom/interfaces/comment.c $LEXBOR_DIR/dom/interfaces/document_fragment.c $LEXBOR_DIR/dom/interfaces/document_type.c $LEXBOR_DIR/dom/interfaces/document.c $LEXBOR_DIR/dom/interfaces/element.c $LEXBOR_DIR/dom/interfaces/node.c $LEXBOR_DIR/dom/interfaces/processing_instruction.c $LEXBOR_DIR/dom/interfaces/shadow_root.c $LEXBOR_DIR/dom/interfaces/text.c $LEXBOR_DIR/encoding/decode.c $LEXBOR_DIR/encoding/encode.c $LEXBOR_DIR/encoding/encoding.c $LEXBOR_DIR/encoding/multi.c $LEXBOR_DIR/encoding/range.c $LEXBOR_DIR/encoding/res.c $LEXBOR_DIR/encoding/single.c $LEXBOR_DIR/html/encoding.c $LEXBOR_DIR/html/interface.c $LEXBOR_DIR/html/interfaces/anchor_element.c $LEXBOR_DIR/html/interfaces/area_element.c $LEXBOR_DIR/html/interfaces/audio_element.c $LEXBOR_DIR/html/interfaces/base_element.c $LEXBOR_DIR/html/interfaces/body_element.c $LEXBOR_DIR/html/interfaces/br_element.c $LEXBOR_DIR/html/interfaces/button_element.c $LEXBOR_DIR/html/interfaces/canvas_element.c $LEXBOR_DIR/html/interfaces/d_list_element.c $LEXBOR_DIR/html/interfaces/data_element.c $LEXBOR_DIR/html/interfaces/data_list_element.c $LEXBOR_DIR/html/interfaces/details_element.c $LEXBOR_DIR/html/interfaces/dialog_element.c $LEXBOR_DIR/html/interfaces/directory_element.c $LEXBOR_DIR/html/interfaces/div_element.c $LEXBOR_DIR/html/interfaces/document.c $LEXBOR_DIR/html/interfaces/element.c $LEXBOR_DIR/html/interfaces/embed_element.c $LEXBOR_DIR/html/interfaces/field_set_element.c $LEXBOR_DIR/html/interfaces/font_element.c $LEXBOR_DIR/html/interfaces/form_element.c $LEXBOR_DIR/html/interfaces/frame_element.c $LEXBOR_DIR/html/interfaces/frame_set_element.c $LEXBOR_DIR/html/interfaces/head_element.c $LEXBOR_DIR/html/interfaces/heading_element.c $LEXBOR_DIR/html/interfaces/hr_element.c $LEXBOR_DIR/html/interfaces/html_element.c $LEXBOR_DIR/html/interfaces/iframe_element.c $LEXBOR_DIR/html/interfaces/image_element.c $LEXBOR_DIR/html/interfaces/input_element.c $LEXBOR_DIR/html/interfaces/label_element.c $LEXBOR_DIR/html/interfaces/legend_element.c $LEXBOR_DIR/html/interfaces/li_element.c $LEXBOR_DIR/html/interfaces/link_element.c $LEXBOR_DIR/html/interfaces/map_element.c $LEXBOR_DIR/html/interfaces/marquee_element.c $LEXBOR_DIR/html/interfaces/media_element.c $LEXBOR_DIR/html/interfaces/menu_element.c $LEXBOR_DIR/html/interfaces/meta_element.c $LEXBOR_DIR/html/interfaces/meter_element.c $LEXBOR_DIR/html/interfaces/mod_element.c $LEXBOR_DIR/html/interfaces/o_list_element.c $LEXBOR_DIR/html/interfaces/object_element.c $LEXBOR_DIR/html/interfaces/opt_group_element.c $LEXBOR_DIR/html/interfaces/option_element.c $LEXBOR_DIR/html/interfaces/output_element.c $LEXBOR_DIR/html/interfaces/paragraph_element.c $LEXBOR_DIR/html/interfaces/param_element.c $LEXBOR_DIR/html/interfaces/picture_element.c $LEXBOR_DIR/html/interfaces/pre_element.c $LEXBOR_DIR/html/interfaces/progress_element.c $LEXBOR_DIR/html/interfaces/quote_element.c $LEXBOR_DIR/html/interfaces/script_element.c $LEXBOR_DIR/html/interfaces/search_element.c $LEXBOR_DIR/html/interfaces/select_element.c $LEXBOR_DIR/html/interfaces/selectedcontent_element.c $LEXBOR_DIR/html/interfaces/slot_element.c $LEXBOR_DIR/html/interfaces/source_element.c $LEXBOR_DIR/html/interfaces/span_element.c $LEXBOR_DIR/html/interfaces/style_element.c $LEXBOR_DIR/html/interfaces/table_caption_element.c $LEXBOR_DIR/html/interfaces/table_cell_element.c $LEXBOR_DIR/html/interfaces/table_col_element.c $LEXBOR_DIR/html/interfaces/table_element.c $LEXBOR_DIR/html/interfaces/table_row_element.c $LEXBOR_DIR/html/interfaces/table_section_element.c $LEXBOR_DIR/html/interfaces/template_element.c $LEXBOR_DIR/html/interfaces/text_area_element.c $LEXBOR_DIR/html/interfaces/time_element.c $LEXBOR_DIR/html/interfaces/title_element.c $LEXBOR_DIR/html/interfaces/track_element.c $LEXBOR_DIR/html/interfaces/u_list_element.c $LEXBOR_DIR/html/interfaces/unknown_element.c $LEXBOR_DIR/html/interfaces/video_element.c $LEXBOR_DIR/html/interfaces/window.c $LEXBOR_DIR/html/parser.c $LEXBOR_DIR/html/tag.c $LEXBOR_DIR/html/token_attr.c $LEXBOR_DIR/html/token.c $LEXBOR_DIR/html/tokenizer.c $LEXBOR_DIR/html/tokenizer/error.c $LEXBOR_DIR/html/tokenizer/state_comment.c $LEXBOR_DIR/html/tokenizer/state_doctype.c $LEXBOR_DIR/html/tokenizer/state_rawtext.c $LEXBOR_DIR/html/tokenizer/state_rcdata.c $LEXBOR_DIR/html/tokenizer/state_script.c $LEXBOR_DIR/html/tokenizer/state.c $LEXBOR_DIR/html/tree.c $LEXBOR_DIR/html/tree/active_formatting.c $LEXBOR_DIR/html/tree/error.c $LEXBOR_DIR/html/tree/insertion_mode/after_after_body.c $LEXBOR_DIR/html/tree/insertion_mode/after_after_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/after_body.c $LEXBOR_DIR/html/tree/insertion_mode/after_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/after_head.c $LEXBOR_DIR/html/tree/insertion_mode/before_head.c $LEXBOR_DIR/html/tree/insertion_mode/before_html.c $LEXBOR_DIR/html/tree/insertion_mode/foreign_content.c $LEXBOR_DIR/html/tree/insertion_mode/in_body.c $LEXBOR_DIR/html/tree/insertion_mode/in_caption.c $LEXBOR_DIR/html/tree/insertion_mode/in_cell.c $LEXBOR_DIR/html/tree/insertion_mode/in_column_group.c $LEXBOR_DIR/html/tree/insertion_mode/in_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/in_head_noscript.c $LEXBOR_DIR/html/tree/insertion_mode/in_head.c $LEXBOR_DIR/html/tree/insertion_mode/in_row.c $LEXBOR_DIR/html/tree/insertion_mode/in_table_body.c $LEXBOR_DIR/html/tree/insertion_mode/in_table_text.c $LEXBOR_DIR/html/tree/insertion_mode/in_table.c $LEXBOR_DIR/html/tree/insertion_mode/in_template.c $LEXBOR_DIR/html/tree/insertion_mode/initial.c $LEXBOR_DIR/html/tree/insertion_mode/text.c $LEXBOR_DIR/html/tree/open_elements.c $LEXBOR_DIR/ns/ns.c $LEXBOR_DIR/ports/posix/lexbor/core/memory.c $LEXBOR_DIR/punycode/punycode.c $LEXBOR_DIR/tag/tag.c $LEXBOR_DIR/unicode/idna.c $LEXBOR_DIR/unicode/unicode.c $LEXBOR_DIR/url/url.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC lexbor;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC lexbor;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_LEXBOR_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_lexbor.c $LEXBOR_DIR/core/array_obj.c $LEXBOR_DIR/core/array.c $LEXBOR_DIR/core/avl.c $LEXBOR_DIR/core/bst.c $LEXBOR_DIR/core/conv.c $LEXBOR_DIR/core/diyfp.c $LEXBOR_DIR/core/dobject.c $LEXBOR_DIR/core/dtoa.c $LEXBOR_DIR/core/hash.c $LEXBOR_DIR/core/mem.c $LEXBOR_DIR/core/mraw.c $LEXBOR_DIR/core/plog.c $LEXBOR_DIR/core/print.c $LEXBOR_DIR/core/serialize.c $LEXBOR_DIR/core/shs.c $LEXBOR_DIR/core/str.c $LEXBOR_DIR/core/strtod.c $LEXBOR_DIR/css/at_rule.c $LEXBOR_DIR/css/at_rule/state.c $LEXBOR_DIR/css/blank.c $LEXBOR_DIR/css/css.c $LEXBOR_DIR/css/declaration.c $LEXBOR_DIR/css/log.c $LEXBOR_DIR/css/parser.c $LEXBOR_DIR/css/property.c $LEXBOR_DIR/css/property/state.c $LEXBOR_DIR/css/rule.c $LEXBOR_DIR/css/selectors/pseudo_state.c $LEXBOR_DIR/css/selectors/pseudo.c $LEXBOR_DIR/css/selectors/selector.c $LEXBOR_DIR/css/selectors/selectors.c $LEXBOR_DIR/css/selectors/state.c $LEXBOR_DIR/css/state.c $LEXBOR_DIR/css/stylesheet.c $LEXBOR_DIR/css/syntax/anb.c $LEXBOR_DIR/css/syntax/parser.c $LEXBOR_DIR/css/syntax/state.c $LEXBOR_DIR/css/syntax/syntax.c $LEXBOR_DIR/css/syntax/token.c $LEXBOR_DIR/css/syntax/tokenizer.c $LEXBOR_DIR/css/syntax/tokenizer/error.c $LEXBOR_DIR/css/unit.c $LEXBOR_DIR/css/value.c $LEXBOR_DIR/dom/interface.c $LEXBOR_DIR/dom/interfaces/attr.c $LEXBOR_DIR/dom/interfaces/cdata_section.c $LEXBOR_DIR/dom/interfaces/character_data.c $LEXBOR_DIR/dom/interfaces/comment.c $LEXBOR_DIR/dom/interfaces/document_fragment.c $LEXBOR_DIR/dom/interfaces/document_type.c $LEXBOR_DIR/dom/interfaces/document.c $LEXBOR_DIR/dom/interfaces/element.c $LEXBOR_DIR/dom/interfaces/node.c $LEXBOR_DIR/dom/interfaces/processing_instruction.c $LEXBOR_DIR/dom/interfaces/shadow_root.c $LEXBOR_DIR/dom/interfaces/text.c $LEXBOR_DIR/encoding/decode.c $LEXBOR_DIR/encoding/encode.c $LEXBOR_DIR/encoding/encoding.c $LEXBOR_DIR/encoding/multi.c $LEXBOR_DIR/encoding/range.c $LEXBOR_DIR/encoding/res.c $LEXBOR_DIR/encoding/single.c $LEXBOR_DIR/html/encoding.c $LEXBOR_DIR/html/interface.c $LEXBOR_DIR/html/interfaces/anchor_element.c $LEXBOR_DIR/html/interfaces/area_element.c $LEXBOR_DIR/html/interfaces/audio_element.c $LEXBOR_DIR/html/interfaces/base_element.c $LEXBOR_DIR/html/interfaces/body_element.c $LEXBOR_DIR/html/interfaces/br_element.c $LEXBOR_DIR/html/interfaces/button_element.c $LEXBOR_DIR/html/interfaces/canvas_element.c $LEXBOR_DIR/html/interfaces/d_list_element.c $LEXBOR_DIR/html/interfaces/data_element.c $LEXBOR_DIR/html/interfaces/data_list_element.c $LEXBOR_DIR/html/interfaces/details_element.c $LEXBOR_DIR/html/interfaces/dialog_element.c $LEXBOR_DIR/html/interfaces/directory_element.c $LEXBOR_DIR/html/interfaces/div_element.c $LEXBOR_DIR/html/interfaces/document.c $LEXBOR_DIR/html/interfaces/element.c $LEXBOR_DIR/html/interfaces/embed_element.c $LEXBOR_DIR/html/interfaces/field_set_element.c $LEXBOR_DIR/html/interfaces/font_element.c $LEXBOR_DIR/html/interfaces/form_element.c $LEXBOR_DIR/html/interfaces/frame_element.c $LEXBOR_DIR/html/interfaces/frame_set_element.c $LEXBOR_DIR/html/interfaces/head_element.c $LEXBOR_DIR/html/interfaces/heading_element.c $LEXBOR_DIR/html/interfaces/hr_element.c $LEXBOR_DIR/html/interfaces/html_element.c $LEXBOR_DIR/html/interfaces/iframe_element.c $LEXBOR_DIR/html/interfaces/image_element.c $LEXBOR_DIR/html/interfaces/input_element.c $LEXBOR_DIR/html/interfaces/label_element.c $LEXBOR_DIR/html/interfaces/legend_element.c $LEXBOR_DIR/html/interfaces/li_element.c $LEXBOR_DIR/html/interfaces/link_element.c $LEXBOR_DIR/html/interfaces/map_element.c $LEXBOR_DIR/html/interfaces/marquee_element.c $LEXBOR_DIR/html/interfaces/media_element.c $LEXBOR_DIR/html/interfaces/menu_element.c $LEXBOR_DIR/html/interfaces/meta_element.c $LEXBOR_DIR/html/interfaces/meter_element.c $LEXBOR_DIR/html/interfaces/mod_element.c $LEXBOR_DIR/html/interfaces/o_list_element.c $LEXBOR_DIR/html/interfaces/object_element.c $LEXBOR_DIR/html/interfaces/opt_group_element.c $LEXBOR_DIR/html/interfaces/option_element.c $LEXBOR_DIR/html/interfaces/output_element.c $LEXBOR_DIR/html/interfaces/paragraph_element.c $LEXBOR_DIR/html/interfaces/param_element.c $LEXBOR_DIR/html/interfaces/picture_element.c $LEXBOR_DIR/html/interfaces/pre_element.c $LEXBOR_DIR/html/interfaces/progress_element.c $LEXBOR_DIR/html/interfaces/quote_element.c $LEXBOR_DIR/html/interfaces/script_element.c $LEXBOR_DIR/html/interfaces/search_element.c $LEXBOR_DIR/html/interfaces/select_element.c $LEXBOR_DIR/html/interfaces/selectedcontent_element.c $LEXBOR_DIR/html/interfaces/slot_element.c $LEXBOR_DIR/html/interfaces/source_element.c $LEXBOR_DIR/html/interfaces/span_element.c $LEXBOR_DIR/html/interfaces/style_element.c $LEXBOR_DIR/html/interfaces/table_caption_element.c $LEXBOR_DIR/html/interfaces/table_cell_element.c $LEXBOR_DIR/html/interfaces/table_col_element.c $LEXBOR_DIR/html/interfaces/table_element.c $LEXBOR_DIR/html/interfaces/table_row_element.c $LEXBOR_DIR/html/interfaces/table_section_element.c $LEXBOR_DIR/html/interfaces/template_element.c $LEXBOR_DIR/html/interfaces/text_area_element.c $LEXBOR_DIR/html/interfaces/time_element.c $LEXBOR_DIR/html/interfaces/title_element.c $LEXBOR_DIR/html/interfaces/track_element.c $LEXBOR_DIR/html/interfaces/u_list_element.c $LEXBOR_DIR/html/interfaces/unknown_element.c $LEXBOR_DIR/html/interfaces/video_element.c $LEXBOR_DIR/html/interfaces/window.c $LEXBOR_DIR/html/parser.c $LEXBOR_DIR/html/tag.c $LEXBOR_DIR/html/token_attr.c $LEXBOR_DIR/html/token.c $LEXBOR_DIR/html/tokenizer.c $LEXBOR_DIR/html/tokenizer/error.c $LEXBOR_DIR/html/tokenizer/state_comment.c $LEXBOR_DIR/html/tokenizer/state_doctype.c $LEXBOR_DIR/html/tokenizer/state_rawtext.c $LEXBOR_DIR/html/tokenizer/state_rcdata.c $LEXBOR_DIR/html/tokenizer/state_script.c $LEXBOR_DIR/html/tokenizer/state.c $LEXBOR_DIR/html/tree.c $LEXBOR_DIR/html/tree/active_formatting.c $LEXBOR_DIR/html/tree/error.c $LEXBOR_DIR/html/tree/insertion_mode/after_after_body.c $LEXBOR_DIR/html/tree/insertion_mode/after_after_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/after_body.c $LEXBOR_DIR/html/tree/insertion_mode/after_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/after_head.c $LEXBOR_DIR/html/tree/insertion_mode/before_head.c $LEXBOR_DIR/html/tree/insertion_mode/before_html.c $LEXBOR_DIR/html/tree/insertion_mode/foreign_content.c $LEXBOR_DIR/html/tree/insertion_mode/in_body.c $LEXBOR_DIR/html/tree/insertion_mode/in_caption.c $LEXBOR_DIR/html/tree/insertion_mode/in_cell.c $LEXBOR_DIR/html/tree/insertion_mode/in_column_group.c $LEXBOR_DIR/html/tree/insertion_mode/in_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/in_head_noscript.c $LEXBOR_DIR/html/tree/insertion_mode/in_head.c $LEXBOR_DIR/html/tree/insertion_mode/in_row.c $LEXBOR_DIR/html/tree/insertion_mode/in_table_body.c $LEXBOR_DIR/html/tree/insertion_mode/in_table_text.c $LEXBOR_DIR/html/tree/insertion_mode/in_table.c $LEXBOR_DIR/html/tree/insertion_mode/in_template.c $LEXBOR_DIR/html/tree/insertion_mode/initial.c $LEXBOR_DIR/html/tree/insertion_mode/text.c $LEXBOR_DIR/html/tree/open_elements.c $LEXBOR_DIR/ns/ns.c $LEXBOR_DIR/ports/posix/lexbor/core/memory.c $LEXBOR_DIR/punycode/punycode.c $LEXBOR_DIR/tag/tag.c $LEXBOR_DIR/unicode/idna.c $LEXBOR_DIR/unicode/unicode.c $LEXBOR_DIR/url/url.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_lexbor="$shared_objects_lexbor $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/lexbor.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/lexbor.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_lexbor"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/lexbor.$suffix: $ext_builddir/lexbor.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/lexbor.$suffix \$(phplibdir)

$ext_builddir/lexbor.$suffix: \$(shared_objects_lexbor) \$(LEXBOR_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_lexbor) \$(LEXBOR_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_LEXBOR 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_LEXBOR_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_lexbor.c $LEXBOR_DIR/core/array_obj.c $LEXBOR_DIR/core/array.c $LEXBOR_DIR/core/avl.c $LEXBOR_DIR/core/bst.c $LEXBOR_DIR/core/conv.c $LEXBOR_DIR/core/diyfp.c $LEXBOR_DIR/core/dobject.c $LEXBOR_DIR/core/dtoa.c $LEXBOR_DIR/core/hash.c $LEXBOR_DIR/core/mem.c $LEXBOR_DIR/core/mraw.c $LEXBOR_DIR/core/plog.c $LEXBOR_DIR/core/print.c $LEXBOR_DIR/core/serialize.c $LEXBOR_DIR/core/shs.c $LEXBOR_DIR/core/str.c $LEXBOR_DIR/core/strtod.c $LEXBOR_DIR/css/at_rule.c $LEXBOR_DIR/css/at_rule/state.c $LEXBOR_DIR/css/blank.c $LEXBOR_DIR/css/css.c $LEXBOR_DIR/css/declaration.c $LEXBOR_DIR/css/log.c $LEXBOR_DIR/css/parser.c $LEXBOR_DIR/css/property.c $LEXBOR_DIR/css/property/state.c $LEXBOR_DIR/css/rule.c $LEXBOR_DIR/css/selectors/pseudo_state.c $LEXBOR_DIR/css/selectors/pseudo.c $LEXBOR_DIR/css/selectors/selector.c $LEXBOR_DIR/css/selectors/selectors.c $LEXBOR_DIR/css/selectors/state.c $LEXBOR_DIR/css/state.c $LEXBOR_DIR/css/stylesheet.c $LEXBOR_DIR/css/syntax/anb.c $LEXBOR_DIR/css/syntax/parser.c $LEXBOR_DIR/css/syntax/state.c $LEXBOR_DIR/css/syntax/syntax.c $LEXBOR_DIR/css/syntax/token.c $LEXBOR_DIR/css/syntax/tokenizer.c $LEXBOR_DIR/css/syntax/tokenizer/error.c $LEXBOR_DIR/css/unit.c $LEXBOR_DIR/css/value.c $LEXBOR_DIR/dom/interface.c $LEXBOR_DIR/dom/interfaces/attr.c $LEXBOR_DIR/dom/interfaces/cdata_section.c $LEXBOR_DIR/dom/interfaces/character_data.c $LEXBOR_DIR/dom/interfaces/comment.c $LEXBOR_DIR/dom/interfaces/document_fragment.c $LEXBOR_DIR/dom/interfaces/document_type.c $LEXBOR_DIR/dom/interfaces/document.c $LEXBOR_DIR/dom/interfaces/element.c $LEXBOR_DIR/dom/interfaces/node.c $LEXBOR_DIR/dom/interfaces/processing_instruction.c $LEXBOR_DIR/dom/interfaces/shadow_root.c $LEXBOR_DIR/dom/interfaces/text.c $LEXBOR_DIR/encoding/decode.c $LEXBOR_DIR/encoding/encode.c $LEXBOR_DIR/encoding/encoding.c $LEXBOR_DIR/encoding/multi.c $LEXBOR_DIR/encoding/range.c $LEXBOR_DIR/encoding/res.c $LEXBOR_DIR/encoding/single.c $LEXBOR_DIR/html/encoding.c $LEXBOR_DIR/html/interface.c $LEXBOR_DIR/html/interfaces/anchor_element.c $LEXBOR_DIR/html/interfaces/area_element.c $LEXBOR_DIR/html/interfaces/audio_element.c $LEXBOR_DIR/html/interfaces/base_element.c $LEXBOR_DIR/html/interfaces/body_element.c $LEXBOR_DIR/html/interfaces/br_element.c $LEXBOR_DIR/html/interfaces/button_element.c $LEXBOR_DIR/html/interfaces/canvas_element.c $LEXBOR_DIR/html/interfaces/d_list_element.c $LEXBOR_DIR/html/interfaces/data_element.c $LEXBOR_DIR/html/interfaces/data_list_element.c $LEXBOR_DIR/html/interfaces/details_element.c $LEXBOR_DIR/html/interfaces/dialog_element.c $LEXBOR_DIR/html/interfaces/directory_element.c $LEXBOR_DIR/html/interfaces/div_element.c $LEXBOR_DIR/html/interfaces/document.c $LEXBOR_DIR/html/interfaces/element.c $LEXBOR_DIR/html/interfaces/embed_element.c $LEXBOR_DIR/html/interfaces/field_set_element.c $LEXBOR_DIR/html/interfaces/font_element.c $LEXBOR_DIR/html/interfaces/form_element.c $LEXBOR_DIR/html/interfaces/frame_element.c $LEXBOR_DIR/html/interfaces/frame_set_element.c $LEXBOR_DIR/html/interfaces/head_element.c $LEXBOR_DIR/html/interfaces/heading_element.c $LEXBOR_DIR/html/interfaces/hr_element.c $LEXBOR_DIR/html/interfaces/html_element.c $LEXBOR_DIR/html/interfaces/iframe_element.c $LEXBOR_DIR/html/interfaces/image_element.c $LEXBOR_DIR/html/interfaces/input_element.c $LEXBOR_DIR/html/interfaces/label_element.c $LEXBOR_DIR/html/interfaces/legend_element.c $LEXBOR_DIR/html/interfaces/li_element.c $LEXBOR_DIR/html/interfaces/link_element.c $LEXBOR_DIR/html/interfaces/map_element.c $LEXBOR_DIR/html/interfaces/marquee_element.c $LEXBOR_DIR/html/interfaces/media_element.c $LEXBOR_DIR/html/interfaces/menu_element.c $LEXBOR_DIR/html/interfaces/meta_element.c $LEXBOR_DIR/html/interfaces/meter_element.c $LEXBOR_DIR/html/interfaces/mod_element.c $LEXBOR_DIR/html/interfaces/o_list_element.c $LEXBOR_DIR/html/interfaces/object_element.c $LEXBOR_DIR/html/interfaces/opt_group_element.c $LEXBOR_DIR/html/interfaces/option_element.c $LEXBOR_DIR/html/interfaces/output_element.c $LEXBOR_DIR/html/interfaces/paragraph_element.c $LEXBOR_DIR/html/interfaces/param_element.c $LEXBOR_DIR/html/interfaces/picture_element.c $LEXBOR_DIR/html/interfaces/pre_element.c $LEXBOR_DIR/html/interfaces/progress_element.c $LEXBOR_DIR/html/interfaces/quote_element.c $LEXBOR_DIR/html/interfaces/script_element.c $LEXBOR_DIR/html/interfaces/search_element.c $LEXBOR_DIR/html/interfaces/select_element.c $LEXBOR_DIR/html/interfaces/selectedcontent_element.c $LEXBOR_DIR/html/interfaces/slot_element.c $LEXBOR_DIR/html/interfaces/source_element.c $LEXBOR_DIR/html/interfaces/span_element.c $LEXBOR_DIR/html/interfaces/style_element.c $LEXBOR_DIR/html/interfaces/table_caption_element.c $LEXBOR_DIR/html/interfaces/table_cell_element.c $LEXBOR_DIR/html/interfaces/table_col_element.c $LEXBOR_DIR/html/interfaces/table_element.c $LEXBOR_DIR/html/interfaces/table_row_element.c $LEXBOR_DIR/html/interfaces/table_section_element.c $LEXBOR_DIR/html/interfaces/template_element.c $LEXBOR_DIR/html/interfaces/text_area_element.c $LEXBOR_DIR/html/interfaces/time_element.c $LEXBOR_DIR/html/interfaces/title_element.c $LEXBOR_DIR/html/interfaces/track_element.c $LEXBOR_DIR/html/interfaces/u_list_element.c $LEXBOR_DIR/html/interfaces/unknown_element.c $LEXBOR_DIR/html/interfaces/video_element.c $LEXBOR_DIR/html/interfaces/window.c $LEXBOR_DIR/html/parser.c $LEXBOR_DIR/html/tag.c $LEXBOR_DIR/html/token_attr.c $LEXBOR_DIR/html/token.c $LEXBOR_DIR/html/tokenizer.c $LEXBOR_DIR/html/tokenizer/error.c $LEXBOR_DIR/html/tokenizer/state_comment.c $LEXBOR_DIR/html/tokenizer/state_doctype.c $LEXBOR_DIR/html/tokenizer/state_rawtext.c $LEXBOR_DIR/html/tokenizer/state_rcdata.c $LEXBOR_DIR/html/tokenizer/state_script.c $LEXBOR_DIR/html/tokenizer/state.c $LEXBOR_DIR/html/tree.c $LEXBOR_DIR/html/tree/active_formatting.c $LEXBOR_DIR/html/tree/error.c $LEXBOR_DIR/html/tree/insertion_mode/after_after_body.c $LEXBOR_DIR/html/tree/insertion_mode/after_after_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/after_body.c $LEXBOR_DIR/html/tree/insertion_mode/after_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/after_head.c $LEXBOR_DIR/html/tree/insertion_mode/before_head.c $LEXBOR_DIR/html/tree/insertion_mode/before_html.c $LEXBOR_DIR/html/tree/insertion_mode/foreign_content.c $LEXBOR_DIR/html/tree/insertion_mode/in_body.c $LEXBOR_DIR/html/tree/insertion_mode/in_caption.c $LEXBOR_DIR/html/tree/insertion_mode/in_cell.c $LEXBOR_DIR/html/tree/insertion_mode/in_column_group.c $LEXBOR_DIR/html/tree/insertion_mode/in_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/in_head_noscript.c $LEXBOR_DIR/html/tree/insertion_mode/in_head.c $LEXBOR_DIR/html/tree/insertion_mode/in_row.c $LEXBOR_DIR/html/tree/insertion_mode/in_table_body.c $LEXBOR_DIR/html/tree/insertion_mode/in_table_text.c $LEXBOR_DIR/html/tree/insertion_mode/in_table.c $LEXBOR_DIR/html/tree/insertion_mode/in_template.c $LEXBOR_DIR/html/tree/insertion_mode/initial.c $LEXBOR_DIR/html/tree/insertion_mode/text.c $LEXBOR_DIR/html/tree/open_elements.c $LEXBOR_DIR/ns/ns.c $LEXBOR_DIR/ports/posix/lexbor/core/memory.c $LEXBOR_DIR/punycode/punycode.c $LEXBOR_DIR/tag/tag.c $LEXBOR_DIR/unicode/idna.c $LEXBOR_DIR/unicode/unicode.c $LEXBOR_DIR/url/url.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC lexbor;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_lexbor.c $LEXBOR_DIR/core/array_obj.c $LEXBOR_DIR/core/array.c $LEXBOR_DIR/core/avl.c $LEXBOR_DIR/core/bst.c $LEXBOR_DIR/core/conv.c $LEXBOR_DIR/core/diyfp.c $LEXBOR_DIR/core/dobject.c $LEXBOR_DIR/core/dtoa.c $LEXBOR_DIR/core/hash.c $LEXBOR_DIR/core/mem.c $LEXBOR_DIR/core/mraw.c $LEXBOR_DIR/core/plog.c $LEXBOR_DIR/core/print.c $LEXBOR_DIR/core/serialize.c $LEXBOR_DIR/core/shs.c $LEXBOR_DIR/core/str.c $LEXBOR_DIR/core/strtod.c $LEXBOR_DIR/css/at_rule.c $LEXBOR_DIR/css/at_rule/state.c $LEXBOR_DIR/css/blank.c $LEXBOR_DIR/css/css.c $LEXBOR_DIR/css/declaration.c $LEXBOR_DIR/css/log.c $LEXBOR_DIR/css/parser.c $LEXBOR_DIR/css/property.c $LEXBOR_DIR/css/property/state.c $LEXBOR_DIR/css/rule.c $LEXBOR_DIR/css/selectors/pseudo_state.c $LEXBOR_DIR/css/selectors/pseudo.c $LEXBOR_DIR/css/selectors/selector.c $LEXBOR_DIR/css/selectors/selectors.c $LEXBOR_DIR/css/selectors/state.c $LEXBOR_DIR/css/state.c $LEXBOR_DIR/css/stylesheet.c $LEXBOR_DIR/css/syntax/anb.c $LEXBOR_DIR/css/syntax/parser.c $LEXBOR_DIR/css/syntax/state.c $LEXBOR_DIR/css/syntax/syntax.c $LEXBOR_DIR/css/syntax/token.c $LEXBOR_DIR/css/syntax/tokenizer.c $LEXBOR_DIR/css/syntax/tokenizer/error.c $LEXBOR_DIR/css/unit.c $LEXBOR_DIR/css/value.c $LEXBOR_DIR/dom/interface.c $LEXBOR_DIR/dom/interfaces/attr.c $LEXBOR_DIR/dom/interfaces/cdata_section.c $LEXBOR_DIR/dom/interfaces/character_data.c $LEXBOR_DIR/dom/interfaces/comment.c $LEXBOR_DIR/dom/interfaces/document_fragment.c $LEXBOR_DIR/dom/interfaces/document_type.c $LEXBOR_DIR/dom/interfaces/document.c $LEXBOR_DIR/dom/interfaces/element.c $LEXBOR_DIR/dom/interfaces/node.c $LEXBOR_DIR/dom/interfaces/processing_instruction.c $LEXBOR_DIR/dom/interfaces/shadow_root.c $LEXBOR_DIR/dom/interfaces/text.c $LEXBOR_DIR/encoding/decode.c $LEXBOR_DIR/encoding/encode.c $LEXBOR_DIR/encoding/encoding.c $LEXBOR_DIR/encoding/multi.c $LEXBOR_DIR/encoding/range.c $LEXBOR_DIR/encoding/res.c $LEXBOR_DIR/encoding/single.c $LEXBOR_DIR/html/encoding.c $LEXBOR_DIR/html/interface.c $LEXBOR_DIR/html/interfaces/anchor_element.c $LEXBOR_DIR/html/interfaces/area_element.c $LEXBOR_DIR/html/interfaces/audio_element.c $LEXBOR_DIR/html/interfaces/base_element.c $LEXBOR_DIR/html/interfaces/body_element.c $LEXBOR_DIR/html/interfaces/br_element.c $LEXBOR_DIR/html/interfaces/button_element.c $LEXBOR_DIR/html/interfaces/canvas_element.c $LEXBOR_DIR/html/interfaces/d_list_element.c $LEXBOR_DIR/html/interfaces/data_element.c $LEXBOR_DIR/html/interfaces/data_list_element.c $LEXBOR_DIR/html/interfaces/details_element.c $LEXBOR_DIR/html/interfaces/dialog_element.c $LEXBOR_DIR/html/interfaces/directory_element.c $LEXBOR_DIR/html/interfaces/div_element.c $LEXBOR_DIR/html/interfaces/document.c $LEXBOR_DIR/html/interfaces/element.c $LEXBOR_DIR/html/interfaces/embed_element.c $LEXBOR_DIR/html/interfaces/field_set_element.c $LEXBOR_DIR/html/interfaces/font_element.c $LEXBOR_DIR/html/interfaces/form_element.c $LEXBOR_DIR/html/interfaces/frame_element.c $LEXBOR_DIR/html/interfaces/frame_set_element.c $LEXBOR_DIR/html/interfaces/head_element.c $LEXBOR_DIR/html/interfaces/heading_element.c $LEXBOR_DIR/html/interfaces/hr_element.c $LEXBOR_DIR/html/interfaces/html_element.c $LEXBOR_DIR/html/interfaces/iframe_element.c $LEXBOR_DIR/html/interfaces/image_element.c $LEXBOR_DIR/html/interfaces/input_element.c $LEXBOR_DIR/html/interfaces/label_element.c $LEXBOR_DIR/html/interfaces/legend_element.c $LEXBOR_DIR/html/interfaces/li_element.c $LEXBOR_DIR/html/interfaces/link_element.c $LEXBOR_DIR/html/interfaces/map_element.c $LEXBOR_DIR/html/interfaces/marquee_element.c $LEXBOR_DIR/html/interfaces/media_element.c $LEXBOR_DIR/html/interfaces/menu_element.c $LEXBOR_DIR/html/interfaces/meta_element.c $LEXBOR_DIR/html/interfaces/meter_element.c $LEXBOR_DIR/html/interfaces/mod_element.c $LEXBOR_DIR/html/interfaces/o_list_element.c $LEXBOR_DIR/html/interfaces/object_element.c $LEXBOR_DIR/html/interfaces/opt_group_element.c $LEXBOR_DIR/html/interfaces/option_element.c $LEXBOR_DIR/html/interfaces/output_element.c $LEXBOR_DIR/html/interfaces/paragraph_element.c $LEXBOR_DIR/html/interfaces/param_element.c $LEXBOR_DIR/html/interfaces/picture_element.c $LEXBOR_DIR/html/interfaces/pre_element.c $LEXBOR_DIR/html/interfaces/progress_element.c $LEXBOR_DIR/html/interfaces/quote_element.c $LEXBOR_DIR/html/interfaces/script_element.c $LEXBOR_DIR/html/interfaces/search_element.c $LEXBOR_DIR/html/interfaces/select_element.c $LEXBOR_DIR/html/interfaces/selectedcontent_element.c $LEXBOR_DIR/html/interfaces/slot_element.c $LEXBOR_DIR/html/interfaces/source_element.c $LEXBOR_DIR/html/interfaces/span_element.c $LEXBOR_DIR/html/interfaces/style_element.c $LEXBOR_DIR/html/interfaces/table_caption_element.c $LEXBOR_DIR/html/interfaces/table_cell_element.c $LEXBOR_DIR/html/interfaces/table_col_element.c $LEXBOR_DIR/html/interfaces/table_element.c $LEXBOR_DIR/html/interfaces/table_row_element.c $LEXBOR_DIR/html/interfaces/table_section_element.c $LEXBOR_DIR/html/interfaces/template_element.c $LEXBOR_DIR/html/interfaces/text_area_element.c $LEXBOR_DIR/html/interfaces/time_element.c $LEXBOR_DIR/html/interfaces/title_element.c $LEXBOR_DIR/html/interfaces/track_element.c $LEXBOR_DIR/html/interfaces/u_list_element.c $LEXBOR_DIR/html/interfaces/unknown_element.c $LEXBOR_DIR/html/interfaces/video_element.c $LEXBOR_DIR/html/interfaces/window.c $LEXBOR_DIR/html/parser.c $LEXBOR_DIR/html/tag.c $LEXBOR_DIR/html/token_attr.c $LEXBOR_DIR/html/token.c $LEXBOR_DIR/html/tokenizer.c $LEXBOR_DIR/html/tokenizer/error.c $LEXBOR_DIR/html/tokenizer/state_comment.c $LEXBOR_DIR/html/tokenizer/state_doctype.c $LEXBOR_DIR/html/tokenizer/state_rawtext.c $LEXBOR_DIR/html/tokenizer/state_rcdata.c $LEXBOR_DIR/html/tokenizer/state_script.c $LEXBOR_DIR/html/tokenizer/state.c $LEXBOR_DIR/html/tree.c $LEXBOR_DIR/html/tree/active_formatting.c $LEXBOR_DIR/html/tree/error.c $LEXBOR_DIR/html/tree/insertion_mode/after_after_body.c $LEXBOR_DIR/html/tree/insertion_mode/after_after_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/after_body.c $LEXBOR_DIR/html/tree/insertion_mode/after_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/after_head.c $LEXBOR_DIR/html/tree/insertion_mode/before_head.c $LEXBOR_DIR/html/tree/insertion_mode/before_html.c $LEXBOR_DIR/html/tree/insertion_mode/foreign_content.c $LEXBOR_DIR/html/tree/insertion_mode/in_body.c $LEXBOR_DIR/html/tree/insertion_mode/in_caption.c $LEXBOR_DIR/html/tree/insertion_mode/in_cell.c $LEXBOR_DIR/html/tree/insertion_mode/in_column_group.c $LEXBOR_DIR/html/tree/insertion_mode/in_frameset.c $LEXBOR_DIR/html/tree/insertion_mode/in_head_noscript.c $LEXBOR_DIR/html/tree/insertion_mode/in_head.c $LEXBOR_DIR/html/tree/insertion_mode/in_row.c $LEXBOR_DIR/html/tree/insertion_mode/in_table_body.c $LEXBOR_DIR/html/tree/insertion_mode/in_table_text.c $LEXBOR_DIR/html/tree/insertion_mode/in_table.c $LEXBOR_DIR/html/tree/insertion_mode/in_template.c $LEXBOR_DIR/html/tree/insertion_mode/initial.c $LEXBOR_DIR/html/tree/insertion_mode/text.c $LEXBOR_DIR/html/tree/open_elements.c $LEXBOR_DIR/ns/ns.c $LEXBOR_DIR/ports/posix/lexbor/core/memory.c $LEXBOR_DIR/punycode/punycode.c $LEXBOR_DIR/tag/tag.c $LEXBOR_DIR/unicode/idna.c $LEXBOR_DIR/unicode/unicode.c $LEXBOR_DIR/url/url.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC lexbor;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=lexbor

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


as_fn_append BUILD_DIR " $ext_builddir/ $ext_builddir/$LEXBOR_DIR/core $ext_builddir/$LEXBOR_DIR/css/at_rule $ext_builddir/$LEXBOR_DIR/css/property $ext_builddir/$LEXBOR_DIR/css/selectors $ext_builddir/$LEXBOR_DIR/css/syntax/tokenizer $ext_builddir/$LEXBOR_DIR/css/tokenizer $ext_builddir/$LEXBOR_DIR/dom/interfaces $ext_builddir/$LEXBOR_DIR/encoding $ext_builddir/$LEXBOR_DIR/html $ext_builddir/$LEXBOR_DIR/html/interfaces $ext_builddir/$LEXBOR_DIR/html/tokenizer $ext_builddir/$LEXBOR_DIR/html/tree/insertion_mode $ext_builddir/$LEXBOR_DIR/ns $ext_builddir/$LEXBOR_DIR/ports/posix/lexbor/core $ext_builddir/$LEXBOR_DIR/punycode $ext_builddir/$LEXBOR_DIR/tag $ext_builddir/$LEXBOR_DIR/unicode $ext_builddir/$LEXBOR_DIR/url"


for include_path in $ext_srcdir; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


    header_path=ext/lexbor
    for header_file in php_lexbor.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done




  PHP_VAR_SUBST="$PHP_VAR_SUBST LEXBOR_SHARED_LIBADD"





















php_enable_mbstring=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable multibyte string support" >&5
printf %s "checking whether to enable multibyte string support... " >&6; }
# Check whether --enable-mbstring was given.
if test ${enable_mbstring+y}
then :
  enableval=$enable_mbstring; PHP_MBSTRING=$enableval
else case e in #(
  e)
  PHP_MBSTRING=no
  test "$PHP_ENABLE_ALL" && PHP_MBSTRING=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_MBSTRING in
shared,*)
  PHP_MBSTRING=$(echo "$PHP_MBSTRING"|$SED 's/^shared,//')
  ;;
shared)
  PHP_MBSTRING=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_enable_mbregex=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable multibyte regex support (requires oniguruma)" >&5
printf %s "checking whether to enable multibyte regex support (requires oniguruma)... " >&6; }
# Check whether --enable-mbregex was given.
if test ${enable_mbregex+y}
then :
  enableval=$enable_mbregex; PHP_MBREGEX=$enableval
else case e in #(
  e)
  PHP_MBREGEX=yes

 ;;
esac
fi


ext_output=$PHP_MBREGEX
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_MBSTRING" != "no"; then

printf "%s\n" "#define HAVE_MBSTRING 1" >>confdefs.h



  PHP_MBSTRING_BASE_SOURCES="$PHP_MBSTRING_BASE_SOURCES mbstring.c php_unicode.c mb_gpc.c"


  if test "x$PHP_MBREGEX" = xyes
then :


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for oniguruma" >&5
printf %s "checking for oniguruma... " >&6; }

if test -n "$ONIG_CFLAGS"; then
    pkg_cv_ONIG_CFLAGS="$ONIG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"oniguruma\""; } >&5
  ($PKG_CONFIG --exists --print-errors "oniguruma") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ONIG_CFLAGS=`$PKG_CONFIG --cflags "oniguruma" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ONIG_LIBS"; then
    pkg_cv_ONIG_LIBS="$ONIG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"oniguruma\""; } >&5
  ($PKG_CONFIG --exists --print-errors "oniguruma") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ONIG_LIBS=`$PKG_CONFIG --libs "oniguruma" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ONIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "oniguruma" 2>&1`
        else
	        ONIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "oniguruma" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ONIG_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (oniguruma) were not met:

$ONIG_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ONIG_CFLAGS
and ONIG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ONIG_CFLAGS
and ONIG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ONIG_CFLAGS=$pkg_cv_ONIG_CFLAGS
	ONIG_LIBS=$pkg_cv_ONIG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $ONIG_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  MBSTRING_SHARED_LIBADD="$MBSTRING_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        MBSTRING_SHARED_LIBADD="$MBSTRING_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        MBSTRING_SHARED_LIBADD="-L$ai_p $MBSTRING_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && MBSTRING_SHARED_LIBADD="$ld_runpath_switch$ai_p $MBSTRING_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $ONIG_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if oniguruma has an invalid entry for KOI8 encoding" >&5
printf %s "checking if oniguruma has an invalid entry for KOI8 encoding... " >&6; }
if test ${php_cv_lib_onig_invalid_koi8+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) save_old_LIBS=$LIBS
      LIBS="$LIBS $MBSTRING_SHARED_LIBADD"
      save_old_CFLAGS=$CFLAGS
      CFLAGS="$CFLAGS $ONIG_CFLAGS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        #include <stdint.h>
        #include <oniguruma.h>

int
main (void)
{
return (intptr_t)(ONIG_ENCODING_KOI8 + 1);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_lib_onig_invalid_koi8=no
else case e in #(
  e) php_cv_lib_onig_invalid_koi8=yes ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
      LIBS=$save_old_LIBS
      CFLAGS=$save_old_CFLAGS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_lib_onig_invalid_koi8" >&5
printf "%s\n" "$php_cv_lib_onig_invalid_koi8" >&6; }
  if test "x$php_cv_lib_onig_invalid_koi8" = xyes
then :

printf "%s\n" "#define PHP_ONIG_BAD_KOI8_ENTRY 1" >>confdefs.h

fi


  PHP_MBSTRING_CFLAGS="$PHP_MBSTRING_CFLAGS -DONIG_ESCAPE_UCHAR_COLLISION=1"


  PHP_MBSTRING_CFLAGS="$PHP_MBSTRING_CFLAGS -DUChar=OnigUChar"



printf "%s\n" "#define HAVE_MBREGEX 1" >>confdefs.h



  PHP_MBSTRING_BASE_SOURCES="$PHP_MBSTRING_BASE_SOURCES php_mbregex.c"


    header_path=ext/mbstring
    for header_file in php_mbregex.h php_onig_compat.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



fi



  PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS libmbfl"


  PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS libmbfl/mbfl"


  PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS libmbfl/filters"


  PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS libmbfl/nls"


  PHP_MBSTRING_EXTRA_INCLUDES="$PHP_MBSTRING_EXTRA_INCLUDES libmbfl"


  PHP_MBSTRING_EXTRA_INCLUDES="$PHP_MBSTRING_EXTRA_INCLUDES libmbfl/mbfl"



  PHP_MBSTRING_SOURCES="$PHP_MBSTRING_SOURCES
    libmbfl/filters/html_entities.c
    libmbfl/filters/mbfilter_7bit.c
    libmbfl/filters/mbfilter_base64.c
    libmbfl/filters/mbfilter_cjk.c
    libmbfl/filters/mbfilter_htmlent.c
    libmbfl/filters/mbfilter_qprint.c
    libmbfl/filters/mbfilter_singlebyte.c
    libmbfl/filters/mbfilter_ucs2.c
    libmbfl/filters/mbfilter_ucs4.c
    libmbfl/filters/mbfilter_utf16.c
    libmbfl/filters/mbfilter_utf32.c
    libmbfl/filters/mbfilter_utf7.c
    libmbfl/filters/mbfilter_utf7imap.c
    libmbfl/filters/mbfilter_utf8.c
    libmbfl/filters/mbfilter_uuencode.c
    libmbfl/mbfl/mbfilter.c
    libmbfl/mbfl/mbfilter_8bit.c
    libmbfl/mbfl/mbfilter_pass.c
    libmbfl/mbfl/mbfilter_wchar.c
    libmbfl/mbfl/mbfl_convert.c
    libmbfl/mbfl/mbfl_encoding.c
    libmbfl/mbfl/mbfl_filter_output.c
    libmbfl/mbfl/mbfl_language.c
    libmbfl/mbfl/mbfl_memory_device.c
    libmbfl/mbfl/mbfl_string.c
    libmbfl/nls/nls_de.c
    libmbfl/nls/nls_en.c
    libmbfl/nls/nls_ja.c
    libmbfl/nls/nls_kr.c
    libmbfl/nls/nls_neutral.c
    libmbfl/nls/nls_ru.c
    libmbfl/nls/nls_uni.c
    libmbfl/nls/nls_zh.c
    libmbfl/nls/nls_hy.c
    libmbfl/nls/nls_tr.c
    libmbfl/nls/nls_ua.c
  "



    header_path=ext/mbstring
    for header_file in libmbfl/config.h libmbfl/mbfl/eaw_table.h libmbfl/mbfl/mbfilter_8bit.h libmbfl/mbfl/mbfilter_pass.h libmbfl/mbfl/mbfilter_wchar.h libmbfl/mbfl/mbfilter.h libmbfl/mbfl/mbfl_consts.h libmbfl/mbfl/mbfl_convert.h libmbfl/mbfl/mbfl_defs.h libmbfl/mbfl/mbfl_encoding.h libmbfl/mbfl/mbfl_filter_output.h libmbfl/mbfl/mbfl_language.h libmbfl/mbfl/mbfl_memory_device.h libmbfl/mbfl/mbfl_string.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done





  ext_builddir=ext/mbstring
  ext_srcdir=$abs_srcdir/ext/mbstring
  ext_dir=ext/mbstring

  ac_extra=$(echo "$PHP_MBSTRING_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_MBSTRING_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $PHP_MBSTRING_BASE_SOURCES $PHP_MBSTRING_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC mbstring;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC mbstring;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_MBSTRING_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in $PHP_MBSTRING_BASE_SOURCES $PHP_MBSTRING_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_mbstring="$shared_objects_mbstring $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/mbstring.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/mbstring.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_mbstring"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/mbstring.$suffix: $ext_builddir/mbstring.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/mbstring.$suffix \$(phplibdir)

$ext_builddir/mbstring.$suffix: \$(shared_objects_mbstring) \$(MBSTRING_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_mbstring) \$(MBSTRING_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_MBSTRING 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_MBSTRING_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $PHP_MBSTRING_BASE_SOURCES $PHP_MBSTRING_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC mbstring;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $PHP_MBSTRING_BASE_SOURCES $PHP_MBSTRING_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC mbstring;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=mbstring

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi



  PHP_VAR_SUBST="$PHP_VAR_SUBST MBSTRING_SHARED_LIBADD"


  for dir in $PHP_MBSTRING_EXTRA_BUILD_DIRS; do
    $php_shtool mkdir -p $ext_builddir/$dir

  done

  for dir in $PHP_MBSTRING_EXTRA_INCLUDES; do

for include_path in $ext_srcdir/$dir; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


for include_path in $ext_builddir/$dir; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

  done

  out="php_config.h"

  if test "$ext_shared" != "no" && test -f "$ext_builddir/config.h.in"; then
    out="$abs_builddir/config.h"
  fi

  cat > $ext_builddir/libmbfl/config.h <<EOF
#include "$out"
EOF


    header_path=ext/mbstring
    for header_file in mbstring.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done




  am_i_shared=$PHP_MBSTRING_SHARED
  is_it_shared=$PHP_PCRE_SHARED
  is_it_enabled=$PHP_PCRE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension mbstring to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build mbstring shared or build pcre statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension mbstring, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
  fi

fi







php_with_mysqli=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MySQLi support" >&5
printf %s "checking for MySQLi support... " >&6; }

# Check whether --with-mysqli was given.
if test ${with_mysqli+y}
then :
  withval=$with_mysqli; PHP_MYSQLI=$withval
else case e in #(
  e)
  PHP_MYSQLI=no
  test "$PHP_ENABLE_ALL" && PHP_MYSQLI=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_MYSQLI in
shared,*)
  PHP_MYSQLI=$(echo "$PHP_MYSQLI"|$SED 's/^shared,//')
  ;;
shared)
  PHP_MYSQLI=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_mysql_sock=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specified location of the MySQL Unix socket" >&5
printf %s "checking for specified location of the MySQL Unix socket... " >&6; }

# Check whether --with-mysql-sock was given.
if test ${with_mysql_sock+y}
then :
  withval=$with_mysql_sock; PHP_MYSQL_SOCK=$withval
else case e in #(
  e)
  PHP_MYSQL_SOCK=no

 ;;
esac
fi


ext_output=$PHP_MYSQL_SOCK
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_MYSQLI" != "no"; then
    case $PHP_MYSQLI in #(
  yes|mysqlnd) :
    PHP_MYSQLND_ENABLED=yes ;; #(
  *) :
    as_fn_error $? "Linking mysqli against external library is no longer supported. Replace
'--with-mysqli=$PHP_MYSQLI' with '--with-mysqli'." "$LINENO" 5 ;;
esac

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MySQL Unix socket location" >&5
printf %s "checking for MySQL Unix socket location... " >&6; }
  case $PHP_MYSQL_SOCK in #(
  yes) :

  for i in  \
    /var/run/mysqld/mysqld.sock \
    /var/tmp/mysql.sock \
    /var/run/mysql/mysql.sock \
    /var/lib/mysql/mysql.sock \
    /var/mysql/mysql.sock \
    /usr/local/mysql/var/mysql.sock \
    /Private/tmp/mysql.sock \
    /private/tmp/mysql.sock \
    /tmp/mysql.sock \
  ; do
    if test -r $i; then
      MYSQL_SOCK=$i
      break
    fi
  done

  if ${MYSQL_SOCK:+false} :
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
else case e in #(
  e)

printf "%s\n" "#define PHP_MYSQL_UNIX_SOCK_ADDR \"$MYSQL_SOCK\"" >>confdefs.h

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MYSQL_SOCK" >&5
printf "%s\n" "$MYSQL_SOCK" >&6; }
   ;;
esac
fi
 ;; #(
  no) :
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;; #(
  *) :

      printf "%s\n" "#define PHP_MYSQL_UNIX_SOCK_ADDR \"$PHP_MYSQL_SOCK\"" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PHP_MYSQL_SOCK" >&5
printf "%s\n" "$PHP_MYSQL_SOCK" >&6; }
     ;;
esac


  ext_builddir=ext/mysqli
  ext_srcdir=$abs_srcdir/ext/mysqli
  ext_dir=ext/mysqli

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_MYSQLI_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mysqli_api.c mysqli_driver.c mysqli_exception.c mysqli_nonapi.c mysqli_prop.c mysqli_report.c mysqli_result_iterator.c mysqli_warning.c mysqli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC mysqli;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC mysqli;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_MYSQLI_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in mysqli_api.c mysqli_driver.c mysqli_exception.c mysqli_nonapi.c mysqli_prop.c mysqli_report.c mysqli_result_iterator.c mysqli_warning.c mysqli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_mysqli="$shared_objects_mysqli $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/mysqli.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/mysqli.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_mysqli"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/mysqli.$suffix: $ext_builddir/mysqli.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/mysqli.$suffix \$(phplibdir)

$ext_builddir/mysqli.$suffix: \$(shared_objects_mysqli) \$(MYSQLI_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_mysqli) \$(MYSQLI_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_MYSQLI 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_MYSQLI_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mysqli_api.c mysqli_driver.c mysqli_exception.c mysqli_nonapi.c mysqli_prop.c mysqli_report.c mysqli_result_iterator.c mysqli_warning.c mysqli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC mysqli;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mysqli_api.c mysqli_driver.c mysqli_exception.c mysqli_nonapi.c mysqli_prop.c mysqli_report.c mysqli_result_iterator.c mysqli_warning.c mysqli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC mysqli;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=mysqli

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/mysqli
    for header_file in php_mysqli_structs.h mysqli_mysqlnd.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



  am_i_shared=$PHP_MYSQLI_SHARED
  is_it_shared=$PHP_MYSQLND_SHARED
  is_it_enabled=$PHP_MYSQLND
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension mysqli to build statically, but it
depends on extension mysqlnd, which you've configured to build shared.
You either need to build mysqli shared or build mysqlnd statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension mysqli, which depends on extension mysqlnd,
but you've either not enabled mysqlnd, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_MYSQLI_SHARED
  is_it_shared=$PHP_SPL_SHARED
  is_it_enabled=$PHP_SPL
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension mysqli to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build mysqli shared or build spl statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension mysqli, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
  fi

fi







if ${ODBC_TYPE:+false} :
then :


php_with_ibm_db2=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IBM DB2 support" >&5
printf %s "checking for IBM DB2 support... " >&6; }

# Check whether --with-ibm-db2 was given.
if test ${with_ibm_db2+y}
then :
  withval=$with_ibm_db2; PHP_IBM_DB2=$withval
else case e in #(
  e)
  PHP_IBM_DB2=no
  test "$PHP_ENABLE_ALL" && PHP_IBM_DB2=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_IBM_DB2 in
shared,*)
  PHP_IBM_DB2=$(echo "$PHP_IBM_DB2"|$SED 's/^shared,//')
  ;;
shared)
  PHP_IBM_DB2=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




  if test "x$PHP_IBM_DB2" = xno
then :

else case e in #(
  e)
    if test "x$PHP_IBM_DB2" = xyes
then :

      ODBC_INCDIR=/home/db2inst1/sqllib/include
      ODBC_LIBDIR=/home/db2inst1/sqllib/lib

else case e in #(
  e)
      ODBC_INCDIR=$PHP_IBM_DB2/include
      ODBC_LIBDIR=$PHP_IBM_DB2/$PHP_LIBDIR
     ;;
esac
fi

    if test ! -f "$ODBC_INCDIR/sqlcli1.h"
then :
  as_fn_error $? "ODBC header file '$ODBC_INCDIR/sqlcli1.h' not found!" "$LINENO" 5
fi

    ODBC_CFLAGS=-I$ODBC_INCDIR
    ODBC_LFLAGS=-L$ODBC_LIBDIR
    ODBC_TYPE=ibm-db2
    ODBC_LIBS=-ldb2

        old_LIBS=$LIBS
    LIBS="$ODBC_LFLAGS $ODBC_LIBS $LIBS"
    ac_fn_c_check_func "$LINENO" "SQLExecute" "ac_cv_func_SQLExecute"
if test "x$ac_cv_func_SQLExecute" = xyes
then :

printf "%s\n" "#define HAVE_IBMDB2 1" >>confdefs.h

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "
ODBC build test failed. You need to source your DB2 environment before running
PHP configure:
# . \$IBM_DB2/db2profile

See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

    LIBS=$old_LIBS
   ;;
esac
fi

fi

if ${ODBC_TYPE:+false} :
then :


php_with_custom_odbc=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a custom ODBC support" >&5
printf %s "checking for a custom ODBC support... " >&6; }

# Check whether --with-custom-odbc was given.
if test ${with_custom_odbc+y}
then :
  withval=$with_custom_odbc; PHP_CUSTOM_ODBC=$withval
else case e in #(
  e)
  PHP_CUSTOM_ODBC=no
  test "$PHP_ENABLE_ALL" && PHP_CUSTOM_ODBC=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_CUSTOM_ODBC in
shared,*)
  PHP_CUSTOM_ODBC=$(echo "$PHP_CUSTOM_ODBC"|$SED 's/^shared,//')
  ;;
shared)
  PHP_CUSTOM_ODBC=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




  if test "x$PHP_CUSTOM_ODBC" = xno
then :

else case e in #(
  e)
    if test "x$PHP_CUSTOM_ODBC" = xyes
then :
  PHP_CUSTOM_ODBC=/usr/local
fi
    ODBC_INCDIR=$PHP_CUSTOM_ODBC/include
    ODBC_LIBDIR=$PHP_CUSTOM_ODBC/$PHP_LIBDIR
    ODBC_LFLAGS=-L$ODBC_LIBDIR
    ODBC_CFLAGS=-I$ODBC_INCDIR
    ODBC_LIBS=$CUSTOM_ODBC_LIBS
    ODBC_TYPE=custom-odbc

printf "%s\n" "#define HAVE_CODBC 1" >>confdefs.h

   ;;
esac
fi

fi

if ${ODBC_TYPE:+false} :
then :


php_with_iodbc=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with iODBC support" >&5
printf %s "checking whether to build with iODBC support... " >&6; }

# Check whether --with-iodbc was given.
if test ${with_iodbc+y}
then :
  withval=$with_iodbc; PHP_IODBC=$withval
else case e in #(
  e)
  PHP_IODBC=no
  test "$PHP_ENABLE_ALL" && PHP_IODBC=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_IODBC in
shared,*)
  PHP_IODBC=$(echo "$PHP_IODBC"|$SED 's/^shared,//')
  ;;
shared)
  PHP_IODBC=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




  if test "x$PHP_IODBC" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libiodbc" >&5
printf %s "checking for libiodbc... " >&6; }

if test -n "$ODBC_CFLAGS"; then
    pkg_cv_ODBC_CFLAGS="$ODBC_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libiodbc\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libiodbc") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ODBC_CFLAGS=`$PKG_CONFIG --cflags "libiodbc" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ODBC_LIBS"; then
    pkg_cv_ODBC_LIBS="$ODBC_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libiodbc\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libiodbc") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ODBC_LIBS=`$PKG_CONFIG --libs "libiodbc" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ODBC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libiodbc" 2>&1`
        else
	        ODBC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libiodbc" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ODBC_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libiodbc) were not met:

$ODBC_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ODBC_CFLAGS
and ODBC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ODBC_CFLAGS
and ODBC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ODBC_CFLAGS=$pkg_cv_ODBC_CFLAGS
	ODBC_LIBS=$pkg_cv_ODBC_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $ODBC_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done

    ODBC_TYPE=iodbc

printf "%s\n" "#define HAVE_IODBC 1" >>confdefs.h

   ;;
esac
fi

fi

if ${ODBC_TYPE:+false} :
then :


php_with_unixodbc=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with unixODBC support" >&5
printf %s "checking whether to build with unixODBC support... " >&6; }

# Check whether --with-unixODBC was given.
if test ${with_unixODBC+y}
then :
  withval=$with_unixODBC; PHP_UNIXODBC=$withval
else case e in #(
  e)
  PHP_UNIXODBC=no
  test "$PHP_ENABLE_ALL" && PHP_UNIXODBC=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_UNIXODBC in
shared,*)
  PHP_UNIXODBC=$(echo "$PHP_UNIXODBC"|$SED 's/^shared,//')
  ;;
shared)
  PHP_UNIXODBC=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




  if test "x$PHP_UNIXODBC" = xno
then :

else case e in #(
  e)
    if test "x$PHP_UNIXODBC" = xyes
then :


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for odbc" >&5
printf %s "checking for odbc... " >&6; }

if test -n "$ODBC_CFLAGS"; then
    pkg_cv_ODBC_CFLAGS="$ODBC_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"odbc\""; } >&5
  ($PKG_CONFIG --exists --print-errors "odbc") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ODBC_CFLAGS=`$PKG_CONFIG --cflags "odbc" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ODBC_LIBS"; then
    pkg_cv_ODBC_LIBS="$ODBC_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"odbc\""; } >&5
  ($PKG_CONFIG --exists --print-errors "odbc") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ODBC_LIBS=`$PKG_CONFIG --libs "odbc" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ODBC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "odbc" 2>&1`
        else
	        ODBC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "odbc" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ODBC_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (odbc) were not met:

$ODBC_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ODBC_CFLAGS
and ODBC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ODBC_CFLAGS
and ODBC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ODBC_CFLAGS=$pkg_cv_ODBC_CFLAGS
	ODBC_LIBS=$pkg_cv_ODBC_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $ODBC_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


else case e in #(
  e)
            ODBC_INCDIR=$PHP_UNIXODBC/include
      ODBC_LIBDIR=$PHP_UNIXODBC/$PHP_LIBDIR
      ODBC_LFLAGS=-L$ODBC_LIBDIR
      ODBC_CFLAGS=-I$ODBC_INCDIR
      ODBC_LIBS=-lodbc
      if test ! -f "$ODBC_INCDIR/sqlext.h"
then :
  as_fn_error $? "ODBC header file '$ODBC_INCDIR/sqlext.h' not found!" "$LINENO" 5
fi
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using unixODBC in $PHP_UNIXODBC" >&5
printf "%s\n" "$as_me: Using unixODBC in $PHP_UNIXODBC" >&6;}
     ;;
esac
fi
    ODBC_TYPE=unixODBC

printf "%s\n" "#define HAVE_UNIXODBC 1" >>confdefs.h

   ;;
esac
fi

fi


if test -n "$ODBC_TYPE"; then

  for ac_i in $ODBC_LFLAGS $ODBC_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ODBC_SHARED_LIBADD="$ODBC_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        ODBC_SHARED_LIBADD="$ODBC_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        ODBC_SHARED_LIBADD="-L$ai_p $ODBC_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && ODBC_SHARED_LIBADD="$ld_runpath_switch$ai_p $ODBC_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_UODBC 1" >>confdefs.h


printf "%s\n" "#define PHP_ODBC_CFLAGS \"$ODBC_CFLAGS\"" >>confdefs.h


printf "%s\n" "#define PHP_ODBC_LIBS \"$ODBC_LIBS\"" >>confdefs.h


printf "%s\n" "#define PHP_ODBC_LFLAGS \"$ODBC_LFLAGS\"" >>confdefs.h


printf "%s\n" "#define PHP_ODBC_TYPE \"$ODBC_TYPE\"" >>confdefs.h



  PHP_VAR_SUBST="$PHP_VAR_SUBST ODBC_SHARED_LIBADD"



  ext_builddir=ext/odbc
  ext_srcdir=$abs_srcdir/ext/odbc
  ext_dir=ext/odbc

  ac_extra=$(echo "$ODBC_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_ODBC_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_odbc.c odbc_utils.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC odbc;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC odbc;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_ODBC_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_odbc.c odbc_utils.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_odbc="$shared_objects_odbc $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/odbc.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/odbc.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_odbc"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/odbc.$suffix: $ext_builddir/odbc.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/odbc.$suffix \$(phplibdir)

$ext_builddir/odbc.$suffix: \$(shared_objects_odbc) \$(ODBC_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_odbc) \$(ODBC_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_ODBC 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_ODBC_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_odbc.c odbc_utils.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC odbc;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_odbc.c odbc_utils.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC odbc;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=odbc

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for any ODBC driver support" >&5
printf %s "checking for any ODBC driver support... " >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi





php_enable_huge_code_pages=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable copying PHP CODE pages into HUGE PAGES" >&5
printf %s "checking whether to enable copying PHP CODE pages into HUGE PAGES... " >&6; }
# Check whether --enable-huge-code-pages was given.
if test ${enable_huge_code_pages+y}
then :
  enableval=$enable_huge_code_pages; PHP_HUGE_CODE_PAGES=$enableval
else case e in #(
  e)
  PHP_HUGE_CODE_PAGES=yes

 ;;
esac
fi


ext_output=$PHP_HUGE_CODE_PAGES
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_enable_opcache_jit=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable JIT" >&5
printf %s "checking whether to enable JIT... " >&6; }
# Check whether --enable-opcache-jit was given.
if test ${enable_opcache_jit+y}
then :
  enableval=$enable_opcache_jit; PHP_OPCACHE_JIT=$enableval
else case e in #(
  e)
  PHP_OPCACHE_JIT=yes

 ;;
esac
fi


ext_output=$PHP_OPCACHE_JIT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_capstone=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support opcache JIT disassembly through Capstone" >&5
printf %s "checking whether to support opcache JIT disassembly through Capstone... " >&6; }

# Check whether --with-capstone was given.
if test ${with_capstone+y}
then :
  withval=$with_capstone; PHP_CAPSTONE=$withval
else case e in #(
  e)
  PHP_CAPSTONE=no

 ;;
esac
fi


ext_output=$PHP_CAPSTONE
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_HUGE_CODE_PAGES" = xyes
then :

printf "%s\n" "#define HAVE_HUGE_CODE_PAGES 1" >>confdefs.h

fi

if test "x$PHP_OPCACHE_JIT" = xyes
then :

  case $host_cpu in #(
  i[34567]86*|x86*|aarch64|amd64) :
     ;; #(
  *) :

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: JIT not supported by host architecture" >&5
printf "%s\n" "$as_me: WARNING: JIT not supported by host architecture" >&2;}
      PHP_OPCACHE_JIT=no
     ;;
esac

  if test "$host_vendor" = "apple" && test "$host_cpu" = "aarch64" && test "$PHP_THREAD_SAFETY" = "yes"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: JIT not supported on Apple Silicon with ZTS" >&5
printf "%s\n" "$as_me: WARNING: JIT not supported on Apple Silicon with ZTS" >&2;}
    PHP_OPCACHE_JIT=no
  fi

fi

if test "x$PHP_OPCACHE_JIT" = xyes
then :


printf "%s\n" "#define HAVE_JIT 1" >>confdefs.h

  ZEND_JIT_SRC=" jit/ir/ir_cfg.c jit/ir/ir_check.c jit/ir/ir_dump.c jit/ir/ir_emit.c jit/ir/ir_gcm.c jit/ir/ir_gdb.c jit/ir/ir_patch.c jit/ir/ir_perf.c jit/ir/ir_ra.c jit/ir/ir_save.c jit/ir/ir_sccp.c jit/ir/ir_strtab.c jit/ir/ir.c jit/zend_jit_vm_helpers.c jit/zend_jit.c "

    case $host_alias in #(
  x86_64-*-darwin*) :

      IR_TARGET=IR_TARGET_X64
      DASM_FLAGS="-D X64APPLE=1 -D X64=1"
      DASM_ARCH="x86"
      TLS_TARGET="darwin"
     ;; #(
  *x86_64*|amd64-*-freebsd*) :

      IR_TARGET=IR_TARGET_X64
      DASM_FLAGS="-D X64=1"
      DASM_ARCH="x86"
      TLS_TARGET="x86_64"
     ;; #(
  i[34567]86*|x86*) :

      IR_TARGET=IR_TARGET_X86
      DASM_ARCH="x86"
      TLS_TARGET="x86"
     ;; #(
  aarch64*) :

      IR_TARGET=IR_TARGET_AARCH64
      DASM_ARCH="aarch64"
      TLS_TARGET="aarch64"
     ;; #(
  *) :
     ;;
esac

  if test "x$PHP_CAPSTONE" = xyes
then :

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capstone >= 3.0.0" >&5
printf %s "checking for capstone >= 3.0.0... " >&6; }

if test -n "$CAPSTONE_CFLAGS"; then
    pkg_cv_CAPSTONE_CFLAGS="$CAPSTONE_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"capstone >= 3.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "capstone >= 3.0.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAPSTONE_CFLAGS=`$PKG_CONFIG --cflags "capstone >= 3.0.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$CAPSTONE_LIBS"; then
    pkg_cv_CAPSTONE_LIBS="$CAPSTONE_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"capstone >= 3.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "capstone >= 3.0.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAPSTONE_LIBS=`$PKG_CONFIG --libs "capstone >= 3.0.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        CAPSTONE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "capstone >= 3.0.0" 2>&1`
        else
	        CAPSTONE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "capstone >= 3.0.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$CAPSTONE_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (capstone >= 3.0.0) were not met:

$CAPSTONE_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CAPSTONE_CFLAGS
and CAPSTONE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables CAPSTONE_CFLAGS
and CAPSTONE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	CAPSTONE_CFLAGS=$pkg_cv_CAPSTONE_CFLAGS
	CAPSTONE_LIBS=$pkg_cv_CAPSTONE_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }


printf "%s\n" "#define HAVE_CAPSTONE 1" >>confdefs.h


  for ac_i in $CAPSTONE_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ="$ -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $CAPSTONE_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done

      ZEND_JIT_SRC="$ZEND_JIT_SRC jit/ir/ir_disasm.c"

fi
fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST IR_TARGET"


  PHP_VAR_SUBST="$PHP_VAR_SUBST DASM_FLAGS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST DASM_ARCH"


  JIT_CFLAGS="-I@ext_builddir@/jit/ir -D$IR_TARGET -DIR_PHP"
  if test "x$ZEND_DEBUG" = xyes
then :
  JIT_CFLAGS="$JIT_CFLAGS -DIR_DEBUG"
fi

  if test "x$PHP_THREAD_SAFETY" = xyes
then :

    ZEND_JIT_SRC="$ZEND_JIT_SRC jit/tls/zend_jit_tls_$TLS_TARGET.c"

fi

fi

ac_fn_c_check_func "$LINENO" "mprotect" "ac_cv_func_mprotect"
if test "x$ac_cv_func_mprotect" = xyes
then :
  printf "%s\n" "#define HAVE_MPROTECT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "shm_create_largepage" "ac_cv_func_shm_create_largepage"
if test "x$ac_cv_func_shm_create_largepage" = xyes
then :
  printf "%s\n" "#define HAVE_SHM_CREATE_LARGEPAGE 1" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysvipc shared memory support" >&5
printf %s "checking for sysvipc shared memory support... " >&6; }
if test ${php_cv_shm_ipc+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_shm_ipc=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <unistd.h>
#include <string.h>

int main(void) {
  pid_t pid;
  int status;
  int ipc_id;
  char *shm;
  struct shmid_ds shmbuf;

  ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W));
  if (ipc_id == -1) {
    return 1;
  }

  shm = shmat(ipc_id, NULL, 0);
  if (shm == (void *)-1) {
    shmctl(ipc_id, IPC_RMID, NULL);
    return 2;
  }

  if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) {
    shmdt(shm);
    shmctl(ipc_id, IPC_RMID, NULL);
    return 3;
  }

  shmbuf.shm_perm.uid = getuid();
  shmbuf.shm_perm.gid = getgid();
  shmbuf.shm_perm.mode = 0600;

  if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) {
    shmdt(shm);
    shmctl(ipc_id, IPC_RMID, NULL);
    return 4;
  }

  shmctl(ipc_id, IPC_RMID, NULL);

  strcpy(shm, "hello");

  pid = fork();
  if (pid < 0) {
    return 5;
  } else if (pid == 0) {
    strcpy(shm, "bye");
    return 6;
  }
  if (wait(&status) != pid) {
    return 7;
  }
  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
    return 8;
  }
  if (strcmp(shm, "bye") != 0) {
    return 9;
  }
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_shm_ipc=yes
else case e in #(
  e) php_cv_shm_ipc=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_shm_ipc" >&5
printf "%s\n" "$php_cv_shm_ipc" >&6; }
if test "x$php_cv_shm_ipc" = xyes
then :

printf "%s\n" "#define HAVE_SHM_IPC 1" >>confdefs.h

fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mmap() using MAP_ANON shared memory support" >&5
printf %s "checking for mmap() using MAP_ANON shared memory support... " >&6; }
if test ${php_cv_shm_mmap_anon+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  case $host_alias in #(
  *linux*|*midipix) :
    php_cv_shm_mmap_anon=yes ;; #(
  *) :
    php_cv_shm_mmap_anon=no ;;
esac
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string.h>

#ifndef MAP_ANON
# ifdef MAP_ANONYMOUS
#  define MAP_ANON MAP_ANONYMOUS
# endif
#endif
#ifndef MAP_FAILED
# define MAP_FAILED ((void*)-1)
#endif

int main(void) {
  pid_t pid;
  int status;
  char *shm;

  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
  if (shm == MAP_FAILED) {
    return 1;
  }

  strcpy(shm, "hello");

  pid = fork();
  if (pid < 0) {
    return 5;
  } else if (pid == 0) {
    strcpy(shm, "bye");
    return 6;
  }
  if (wait(&status) != pid) {
    return 7;
  }
  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
    return 8;
  }
  if (strcmp(shm, "bye") != 0) {
    return 9;
  }
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_shm_mmap_anon=yes
else case e in #(
  e) php_cv_shm_mmap_anon=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_shm_mmap_anon" >&5
printf "%s\n" "$php_cv_shm_mmap_anon" >&6; }
if test "x$php_cv_shm_mmap_anon" = xyes
then :

printf "%s\n" "#define HAVE_SHM_MMAP_ANON 1" >>confdefs.h

fi

          LIBS_save=$LIBS
  LIBS=
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
printf %s "checking for library containing shm_open... " >&6; }
if test ${ac_cv_search_shm_open+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char shm_open (void);
int
main (void)
{
return shm_open ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_shm_open=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_shm_open+y}
then :
  break
fi
done
if test ${ac_cv_search_shm_open+y}
then :

else case e in #(
  e) ac_cv_search_shm_open=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
printf "%s\n" "$ac_cv_search_shm_open" >&6; }
ac_res=$ac_cv_search_shm_open
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mmap() using shm_open() shared memory support" >&5
printf %s "checking for mmap() using shm_open() shared memory support... " >&6; }
if test ${php_cv_shm_mmap_posix+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_shm_mmap_posix=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#ifndef MAP_FAILED
# define MAP_FAILED ((void*)-1)
#endif

int main(void) {
  pid_t pid;
  int status;
  int fd;
  char *shm;
  char tmpname[4096];

  sprintf(tmpname,"/opcache.test.shm.%dXXXXXX", getpid());
  if (mktemp(tmpname) == NULL) {
    return 1;
  }
  fd = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
  if (fd == -1) {
    return 2;
  }
  if (ftruncate(fd, 4096) < 0) {
    close(fd);
    shm_unlink(tmpname);
    return 3;
  }

  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
  if (shm == MAP_FAILED) {
    return 4;
  }
  shm_unlink(tmpname);
  close(fd);

  strcpy(shm, "hello");

  pid = fork();
  if (pid < 0) {
    return 5;
  } else if (pid == 0) {
    strcpy(shm, "bye");
    return 6;
  }
  if (wait(&status) != pid) {
    return 7;
  }
  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
    return 8;
  }
  if (strcmp(shm, "bye") != 0) {
    return 9;
  }
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_shm_mmap_posix=yes
else case e in #(
  e) php_cv_shm_mmap_posix=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_shm_mmap_posix" >&5
printf "%s\n" "$php_cv_shm_mmap_posix" >&6; }

fi

LIBS=$LIBS_save

if test "x$php_cv_shm_mmap_posix" = xyes
then :


printf "%s\n" "#define HAVE_SHM_MMAP_POSIX 1" >>confdefs.h

  case $ac_cv_search_shm_open in #(
  "none required"|no) :
     ;; #(
  *) :

  for ac_i in $ac_cv_search_shm_open; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ="$ -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

       ;; #(
  *) :
     ;;
esac
  done
 ;;
esac

fi


  ext_builddir=ext/opcache
  ext_srcdir=$abs_srcdir/ext/opcache
  ext_dir=ext/opcache

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $JIT_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_OPCACHE_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in shared_alloc_mmap.c shared_alloc_posix.c shared_alloc_shm.c zend_accelerator_api.c zend_accelerator_blacklist.c zend_accelerator_debug.c zend_accelerator_hash.c zend_accelerator_module.c zend_accelerator_util_funcs.c zend_file_cache.c zend_persist_calc.c zend_persist.c zend_shared_alloc.c ZendAccelerator.c $ZEND_JIT_SRC; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC opcache;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC opcache;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_OPCACHE_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in shared_alloc_mmap.c shared_alloc_posix.c shared_alloc_shm.c zend_accelerator_api.c zend_accelerator_blacklist.c zend_accelerator_debug.c zend_accelerator_hash.c zend_accelerator_module.c zend_accelerator_util_funcs.c zend_file_cache.c zend_persist_calc.c zend_persist.c zend_shared_alloc.c ZendAccelerator.c $ZEND_JIT_SRC; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_opcache="$shared_objects_opcache $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "xyes" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/opcache.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/opcache.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_opcache"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/opcache.$suffix: $ext_builddir/opcache.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/opcache.$suffix \$(phplibdir)

$ext_builddir/opcache.$suffix: \$(shared_objects_opcache) \$(OPCACHE_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_opcache) \$(OPCACHE_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_OPCACHE 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_OPCACHE_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in shared_alloc_mmap.c shared_alloc_posix.c shared_alloc_shm.c zend_accelerator_api.c zend_accelerator_blacklist.c zend_accelerator_debug.c zend_accelerator_hash.c zend_accelerator_module.c zend_accelerator_util_funcs.c zend_file_cache.c zend_persist_calc.c zend_persist.c zend_shared_alloc.c ZendAccelerator.c $ZEND_JIT_SRC; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC opcache;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in shared_alloc_mmap.c shared_alloc_posix.c shared_alloc_shm.c zend_accelerator_api.c zend_accelerator_blacklist.c zend_accelerator_debug.c zend_accelerator_hash.c zend_accelerator_module.c zend_accelerator_util_funcs.c zend_file_cache.c zend_persist_calc.c zend_persist.c zend_shared_alloc.c ZendAccelerator.c $ZEND_JIT_SRC; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC opcache;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=opcache

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi



  am_i_shared=$PHP_OPCACHE_SHARED
  is_it_shared=$PHP_DATE_SHARED
  is_it_enabled=$PHP_DATE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension opcache to build statically, but it
depends on extension date, which you've configured to build shared.
You either need to build opcache shared or build date statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension opcache, which depends on extension date,
but you've either not enabled date, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_OPCACHE_SHARED
  is_it_shared=$PHP_PCRE_SHARED
  is_it_enabled=$PHP_PCRE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension opcache to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build opcache shared or build pcre statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension opcache, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
  fi


if test "$php_cv_shm_ipc" != "yes" && test "$php_cv_shm_mmap_posix" != "yes" && test "$php_cv_shm_mmap_anon" != "yes"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No supported shared memory caching support was found when configuring opcache.
Opcache will be disabled." >&5
printf "%s\n" "$as_me: WARNING: No supported shared memory caching support was found when configuring opcache.
Opcache will be disabled." >&2;}
fi

if test "x$PHP_OPCACHE_JIT" = xyes
then :

  as_fn_append BUILD_DIR " $ext_builddir/jit $ext_builddir/jit/ir"

  if test "x$PHP_THREAD_SAFETY" = xyes
then :

    as_fn_append BUILD_DIR " $ext_builddir/jit/tls"


fi
    src=$ext_srcdir/jit/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments


fi


    header_path=ext/opcache
    for header_file in zend_accelerator_api.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done







php_enable_pcntl=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable pcntl support" >&5
printf %s "checking whether to enable pcntl support... " >&6; }
# Check whether --enable-pcntl was given.
if test ${enable_pcntl+y}
then :
  enableval=$enable_pcntl; PHP_PCNTL=$enableval
else case e in #(
  e)
  PHP_PCNTL=no
  test "$PHP_ENABLE_ALL" && PHP_PCNTL=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PCNTL in
shared,*)
  PHP_PCNTL=$(echo "$PHP_PCNTL"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PCNTL=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PCNTL" != "no"; then
  for function in fork sigaction waitpid; do
    as_ac_var=`printf "%s\n" "ac_cv_func_$function" | sed "$as_sed_sh"`
ac_fn_c_check_func "$LINENO" "$function" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "ext/pcntl: required function $function() not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

  done

  ac_fn_c_check_func "$LINENO" "forkx" "ac_cv_func_forkx"
if test "x$ac_cv_func_forkx" = xyes
then :
  printf "%s\n" "#define HAVE_FORKX 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getcpuid" "ac_cv_func_getcpuid"
if test "x$ac_cv_func_getcpuid" = xyes
then :
  printf "%s\n" "#define HAVE_GETCPUID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getpriority" "ac_cv_func_getpriority"
if test "x$ac_cv_func_getpriority" = xyes
then :
  printf "%s\n" "#define HAVE_GETPRIORITY 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pset_bind" "ac_cv_func_pset_bind"
if test "x$ac_cv_func_pset_bind" = xyes
then :
  printf "%s\n" "#define HAVE_PSET_BIND 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_set_qos_class_self_np" "ac_cv_func_pthread_set_qos_class_self_np"
if test "x$ac_cv_func_pthread_set_qos_class_self_np" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_SET_QOS_CLASS_SELF_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "rfork" "ac_cv_func_rfork"
if test "x$ac_cv_func_rfork" = xyes
then :
  printf "%s\n" "#define HAVE_RFORK 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sched_setaffinity" "ac_cv_func_sched_setaffinity"
if test "x$ac_cv_func_sched_setaffinity" = xyes
then :
  printf "%s\n" "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
if test "x$ac_cv_func_setpriority" = xyes
then :
  printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sigwaitinfo" "ac_cv_func_sigwaitinfo"
if test "x$ac_cv_func_sigwaitinfo" = xyes
then :
  printf "%s\n" "#define HAVE_SIGWAITINFO 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sigtimedwait" "ac_cv_func_sigtimedwait"
if test "x$ac_cv_func_sigtimedwait" = xyes
then :
  printf "%s\n" "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "unshare" "ac_cv_func_unshare"
if test "x$ac_cv_func_unshare" = xyes
then :
  printf "%s\n" "#define HAVE_UNSHARE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
if test "x$ac_cv_func_wait3" = xyes
then :
  printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4"
if test "x$ac_cv_func_wait4" = xyes
then :
  printf "%s\n" "#define HAVE_WAIT4 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
if test "x$ac_cv_func_waitid" = xyes
then :
  printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "wait6" "ac_cv_func_wait6"
if test "x$ac_cv_func_wait6" = xyes
then :
  printf "%s\n" "#define HAVE_WAIT6 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
if test "x$ac_cv_func_syscall" = xyes
then :
  printf "%s\n" "#define HAVE_SYSCALL 1" >>confdefs.h

fi



  for ac_func in WIFCONTINUED
do :
  ac_fn_c_check_func "$LINENO" "WIFCONTINUED" "ac_cv_func_WIFCONTINUED"
if test "x$ac_cv_func_WIFCONTINUED" = xyes
then :
  printf "%s\n" "#define HAVE_WIFCONTINUED 1" >>confdefs.h

else case e in #(
  e) ac_fn_check_decl "$LINENO" "WIFCONTINUED" "ac_cv_have_decl_WIFCONTINUED" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_WIFCONTINUED" = xyes
then :
  printf "%s\n" "#define HAVE_WIFCONTINUED 1" >>confdefs.h

fi ;;
esac
fi

done

  ac_fn_check_decl "$LINENO" "WCONTINUED" "ac_cv_have_decl_WCONTINUED" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_WCONTINUED" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_WCONTINUED $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "WEXITED" "ac_cv_have_decl_WEXITED" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_WEXITED" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_WEXITED $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "WSTOPPED" "ac_cv_have_decl_WSTOPPED" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_WSTOPPED" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_WSTOPPED $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "WNOWAIT" "ac_cv_have_decl_WNOWAIT" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_WNOWAIT" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_WNOWAIT $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "P_ALL" "ac_cv_have_decl_P_ALL" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_P_ALL" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_P_ALL $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "P_PIDFD" "ac_cv_have_decl_P_PIDFD" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_P_PIDFD" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_P_PIDFD $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "P_UID" "ac_cv_have_decl_P_UID" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_P_UID" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_P_UID $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "P_JAILID" "ac_cv_have_decl_P_JAILID" "#include <sys/wait.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_P_JAILID" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_P_JAILID $ac_have_decl" >>confdefs.h


  ac_fn_check_decl "$LINENO" "SYS_waitid" "ac_cv_have_decl_SYS_waitid" "#include <sys/syscall.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_SYS_waitid" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_SYS_WAITID $ac_have_decl" >>confdefs.h


  ac_fn_check_decl "$LINENO" "SYS_pidfd_open" "ac_cv_have_decl_SYS_pidfd_open" "#include <sys/syscall.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_SYS_pidfd_open" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_SYS_PIDFD_OPEN $ac_have_decl" >>confdefs.h


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sched_getcpu is supported" >&5
printf %s "checking if sched_getcpu is supported... " >&6; }
if test ${php_cv_func_sched_getcpu+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_func_sched_getcpu=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sched.h>
int main(void) {
  if (sched_getcpu() == -1) {
      return 1;
  }
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_sched_getcpu=yes
else case e in #(
  e) php_cv_func_sched_getcpu=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_sched_getcpu" >&5
printf "%s\n" "$php_cv_func_sched_getcpu" >&6; }
  if test "x$php_cv_func_sched_getcpu" = xyes
then :

printf "%s\n" "#define HAVE_SCHED_GETCPU 1" >>confdefs.h

fi

  ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include <signal.h>
"
if test "x$ac_cv_type_siginfo_t" = xyes
then :
  PCNTL_CFLAGS="-DHAVE_STRUCT_SIGINFO_T"
fi



  ext_builddir=ext/pcntl
  ext_srcdir=$abs_srcdir/ext/pcntl
  ext_dir=ext/pcntl

  ac_extra=$(echo "$PCNTL_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" != "cli"; then
    PHP_PCNTL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pcntl.c php_signal.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pcntl;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pcntl;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PCNTL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pcntl.c php_signal.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pcntl="$shared_objects_pcntl $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pcntl.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pcntl.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pcntl"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pcntl.$suffix: $ext_builddir/pcntl.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pcntl.$suffix \$(phplibdir)

$ext_builddir/pcntl.$suffix: \$(shared_objects_pcntl) \$(PCNTL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pcntl) \$(PCNTL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PCNTL 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" = "cli"; then
    PHP_PCNTL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pcntl.c php_signal.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pcntl;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pcntl.c php_signal.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pcntl;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pcntl

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

fi





php_enable_pdo=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable PDO support" >&5
printf %s "checking whether to enable PDO support... " >&6; }
# Check whether --enable-pdo was given.
if test ${enable_pdo+y}
then :
  enableval=$enable_pdo; PHP_PDO=$enableval
else case e in #(
  e)
  PHP_PDO=yes
  test "$PHP_ENABLE_ALL" && PHP_PDO=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PDO in
shared,*)
  PHP_PDO=$(echo "$PHP_PDO"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PDO=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PDO" != "no"; then
    PHP_PDO=yes


  ext_builddir=ext/pdo
  ext_srcdir=$abs_srcdir/ext/pdo
  ext_dir=ext/pdo

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PDO_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pdo;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pdo;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PDO_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pdo="$shared_objects_pdo $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pdo.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pdo.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pdo"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pdo.$suffix: $ext_builddir/pdo.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pdo.$suffix \$(phplibdir)

$ext_builddir/pdo.$suffix: \$(shared_objects_pdo) \$(PDO_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pdo) \$(PDO_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PDO 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PDO_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pdo;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pdo;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pdo

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_PDO_SHARED
  is_it_shared=$PHP_SPL_SHARED
  is_it_enabled=$PHP_SPL
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pdo to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build pdo shared or build spl statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pdo, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
  fi


    header_path=ext/pdo
    for header_file in pdo_sql_parser.h php_pdo_driver.h php_pdo_error.h php_pdo.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done


    src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

fi





php_with_pdo_dblib=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PDO_DBLIB support via FreeTDS" >&5
printf %s "checking for PDO_DBLIB support via FreeTDS... " >&6; }

# Check whether --with-pdo-dblib was given.
if test ${with_pdo_dblib+y}
then :
  withval=$with_pdo_dblib; PHP_PDO_DBLIB=$withval
else case e in #(
  e)
  PHP_PDO_DBLIB=no
  test "$PHP_ENABLE_ALL" && PHP_PDO_DBLIB=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PDO_DBLIB in
shared,*)
  PHP_PDO_DBLIB=$(echo "$PHP_PDO_DBLIB"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PDO_DBLIB=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PDO_DBLIB" != "no"; then
  if test "x$PHP_PDO_DBLIB" = xyes
then :


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff=""

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dbsqlexec in -lsybdb" >&5
printf %s "checking for dbsqlexec in -lsybdb... " >&6; }
if test ${ac_cv_lib_sybdb_dbsqlexec+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsybdb  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dbsqlexec (void);
int
main (void)
{
return dbsqlexec ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sybdb_dbsqlexec=yes
else case e in #(
  e) ac_cv_lib_sybdb_dbsqlexec=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_dbsqlexec" >&5
printf "%s\n" "$ac_cv_lib_sybdb_dbsqlexec" >&6; }
if test "x$ac_cv_lib_sybdb_dbsqlexec" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_sybdb_dbsqlexec
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Cannot find FreeTDS in known installation directories.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi



  case sybdb in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        PDO_DBLIB_SHARED_LIBADD="-lsybdb $PDO_DBLIB_SHARED_LIBADD"
    else


  case sybdb in
  c|c_r) ;;
  *)
      LIBS="-lsybdb $LIBS"
   ;;
  esac


    fi
   ;;
  esac



else case e in #(
  e)
    if test -f $PHP_PDO_DBLIB/include/sybdb.h; then
      PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
      PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include
    elif test -f $PHP_PDO_DBLIB/include/freetds/sybdb.h; then
      PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
      PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include/freetds
    else
      as_fn_error $? "Directory $PHP_PDO_DBLIB is not a FreeTDS installation directory" "$LINENO" 5
    fi

    if test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a" && test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so"; then
       as_fn_error $? "Could not find $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so]" "$LINENO" 5
    fi


for include_path in $PDO_FREETDS_INCLUDE_DIR; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done



  if test "$ext_shared" = "yes"; then
    PDO_DBLIB_SHARED_LIBADD="-lsybdb $PDO_DBLIB_SHARED_LIBADD"
    if test -n "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR"; then

  if test "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" || echo "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        PDO_DBLIB_SHARED_LIBADD="-L$ai_p $PDO_DBLIB_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && PDO_DBLIB_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_DBLIB_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR"; then

  if test "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" || echo "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case sybdb in
  c|c_r) ;;
  *)
      LIBS="-lsybdb $LIBS"
   ;;
  esac




  fi


   ;;
esac
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
printf %s "checking for PDO includes... " >&6; }
if test ${pdo_cv_inc_path+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    if test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$phpincludedir/ext
    fi
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pdo_cv_inc_path" >&5
printf "%s\n" "$pdo_cv_inc_path" >&6; }
  if test -n "$pdo_cv_inc_path"; then
:
  else
as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
  fi


  PDO_DBLIB_DEFS="-DPDO_DBLIB_FLAVOUR=\\\"freetds\\\""

  ext_builddir=ext/pdo_dblib
  ext_srcdir=$abs_srcdir/ext/pdo_dblib
  ext_dir=ext/pdo_dblib

  ac_extra=$(echo "$PDO_DBLIB_DEFS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PDO_DBLIB_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_dblib.c dblib_driver.c dblib_stmt.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pdo_dblib;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_dblib;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PDO_DBLIB_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pdo_dblib.c dblib_driver.c dblib_stmt.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pdo_dblib="$shared_objects_pdo_dblib $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pdo_dblib.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pdo_dblib.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pdo_dblib"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pdo_dblib.$suffix: $ext_builddir/pdo_dblib.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pdo_dblib.$suffix \$(phplibdir)

$ext_builddir/pdo_dblib.$suffix: \$(shared_objects_pdo_dblib) \$(PDO_DBLIB_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pdo_dblib) \$(PDO_DBLIB_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PDO_DBLIB 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PDO_DBLIB_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_dblib.c dblib_driver.c dblib_stmt.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pdo_dblib;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_dblib.c dblib_driver.c dblib_stmt.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_dblib;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pdo_dblib

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_DBLIB_SHARED_LIBADD"



  am_i_shared=$PHP_PDO_DBLIB_SHARED
  is_it_shared=$PHP_PDO_SHARED
  is_it_enabled=$PHP_PDO
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pdo_dblib to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_dblib shared or build pdo statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pdo_dblib, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
  fi

fi





php_with_pdo_firebird=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Firebird support for PDO" >&5
printf %s "checking for Firebird support for PDO... " >&6; }

# Check whether --with-pdo-firebird was given.
if test ${with_pdo_firebird+y}
then :
  withval=$with_pdo_firebird; PHP_PDO_FIREBIRD=$withval
else case e in #(
  e)
  PHP_PDO_FIREBIRD=no
  test "$PHP_ENABLE_ALL" && PHP_PDO_FIREBIRD=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PDO_FIREBIRD in
shared,*)
  PHP_PDO_FIREBIRD=$(echo "$PHP_PDO_FIREBIRD"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PDO_FIREBIRD=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PDO_FIREBIRD" != "no"; then
  # Extract the first word of "fb_config", so it can be a program name with args.
set dummy fb_config; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_FB_CONFIG+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $FB_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_FB_CONFIG="$FB_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_FB_CONFIG="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_FB_CONFIG" && ac_cv_path_FB_CONFIG="no"
  ;;
esac ;;
esac
fi
FB_CONFIG=$ac_cv_path_FB_CONFIG
if test -n "$FB_CONFIG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FB_CONFIG" >&5
printf "%s\n" "$FB_CONFIG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi



  if test -x "$FB_CONFIG" && test "$PHP_PDO_FIREBIRD" = "yes"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfbconfig" >&5
printf %s "checking for libfbconfig... " >&6; }
    FB_CFLAGS=$($FB_CONFIG --cflags)
    FB_LIBDIR=$($FB_CONFIG --libs)
    FB_VERSION=$($FB_CONFIG --version)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: version $FB_VERSION" >&5
printf "%s\n" "version $FB_VERSION" >&6; }
    as_arg_v1=$FB_VERSION
as_arg_v2=3.0
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
case $? in #(
  1) :
    as_fn_error $? "Firebird required version is at least 3.0" "$LINENO" 5 ;; #(
  0) :
     ;; #(
  2) :
     ;; #(
  *) :
     ;;
esac

  for ac_i in $FB_LIBDIR; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  PDO_FIREBIRD_SHARED_LIBADD="$PDO_FIREBIRD_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        PDO_FIREBIRD_SHARED_LIBADD="$PDO_FIREBIRD_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        PDO_FIREBIRD_SHARED_LIBADD="-L$ai_p $PDO_FIREBIRD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && PDO_FIREBIRD_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_FIREBIRD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $FB_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done

  else
    if test "x$PHP_PDO_FIREBIRD" = xyes
then :

      FIREBIRD_INCDIR=
      FIREBIRD_LIBDIR=
      FIREBIRD_LIBDIR_FLAG=

else case e in #(
  e)
      FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include
      FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR
      FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR
     ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$FIREBIRD_LIBDIR_FLAG"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fb_get_master_interface in -lfbclient" >&5
printf %s "checking for fb_get_master_interface in -lfbclient... " >&6; }
if test ${ac_cv_lib_fbclient_fb_get_master_interface+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lfbclient  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char fb_get_master_interface (void);
int
main (void)
{
return fb_get_master_interface ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_fbclient_fb_get_master_interface=yes
else case e in #(
  e) ac_cv_lib_fbclient_fb_get_master_interface=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fbclient_fb_get_master_interface" >&5
printf "%s\n" "$ac_cv_lib_fbclient_fb_get_master_interface" >&6; }
if test "x$ac_cv_lib_fbclient_fb_get_master_interface" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_fbclient_fb_get_master_interface
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "libfbclient not found.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi



  if test "$ext_shared" = "yes"; then
    PDO_FIREBIRD_SHARED_LIBADD="-lfbclient $PDO_FIREBIRD_SHARED_LIBADD"
    if test -n "$FIREBIRD_LIBDIR"; then

  if test "$FIREBIRD_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FIREBIRD_LIBDIR" != "/usr/lib"; then

  if test -z "$FIREBIRD_LIBDIR" || echo "$FIREBIRD_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$FIREBIRD_LIBDIR
  else

    ep_dir=$(echo $FIREBIRD_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$FIREBIRD_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        PDO_FIREBIRD_SHARED_LIBADD="-L$ai_p $PDO_FIREBIRD_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && PDO_FIREBIRD_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_FIREBIRD_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$FIREBIRD_LIBDIR"; then

  if test "$FIREBIRD_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$FIREBIRD_LIBDIR" != "/usr/lib"; then

  if test -z "$FIREBIRD_LIBDIR" || echo "$FIREBIRD_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$FIREBIRD_LIBDIR
  else

    ep_dir=$(echo $FIREBIRD_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$FIREBIRD_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case fbclient in
  c|c_r) ;;
  *)
      LIBS="-lfbclient $LIBS"
   ;;
  esac




  fi



for include_path in $FIREBIRD_INCDIR; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
printf %s "checking for PDO includes... " >&6; }
if test ${pdo_cv_inc_path+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    if test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$phpincludedir/ext
    fi
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pdo_cv_inc_path" >&5
printf "%s\n" "$pdo_cv_inc_path" >&6; }
  if test -n "$pdo_cv_inc_path"; then
:
  else
as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
  fi



  ext_builddir=ext/pdo_firebird
  ext_srcdir=$abs_srcdir/ext/pdo_firebird
  ext_dir=ext/pdo_firebird

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PDO_FIREBIRD_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_firebird.c firebird_driver.c firebird_statement.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pdo_firebird;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_firebird;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PDO_FIREBIRD_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pdo_firebird.c firebird_driver.c firebird_statement.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pdo_firebird="$shared_objects_pdo_firebird $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pdo_firebird.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pdo_firebird.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pdo_firebird"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pdo_firebird.$suffix: $ext_builddir/pdo_firebird.$suffix
	\$(LIBTOOL) --tag=CXX --mode=install cp $ext_builddir/pdo_firebird.$suffix \$(phplibdir)

$ext_builddir/pdo_firebird.$suffix: \$(shared_objects_pdo_firebird) \$(PDO_FIREBIRD_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CXX --mode=link \$(CXX) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pdo_firebird) \$(PDO_FIREBIRD_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PDO_FIREBIRD 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PDO_FIREBIRD_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_firebird.c firebird_driver.c firebird_statement.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pdo_firebird;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_firebird.c firebird_driver.c firebird_statement.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_firebird;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pdo_firebird

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_FIREBIRD_SHARED_LIBADD"


  am_i_shared=$PHP_PDO_FIREBIRD_SHARED
  is_it_shared=$PHP_PDO_SHARED
  is_it_enabled=$PHP_PDO
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pdo_firebird to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_firebird shared or build pdo statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pdo_firebird, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
  fi



if ${php_cxx_done:+false} :
then :

  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
printf "%s\n" "$CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
printf "%s\n" "$ac_ct_CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
printf %s "checking whether the compiler supports GNU C++... " >&6; }
if test ${ac_cv_cxx_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else case e in #(
  e) ac_compiler_gnu=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+y}
ac_save_CXXFLAGS=$CXXFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
printf %s "checking whether $CXX accepts -g... " >&6; }
if test ${ac_cv_prog_cxx_g+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
else case e in #(
  e) CXXFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :

else case e in #(
  e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
if test $ac_test_CXXFLAGS; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_prog_cxx_stdcxx=no
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx11+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cxx_cxx11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx11_program
_ACEOF
for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX ;;
esac
fi

if test "x$ac_cv_prog_cxx_cxx11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cxx_cxx11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx11" ;;
esac
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
  ac_prog_cxx_stdcxx=cxx11 ;;
esac
fi
fi
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx98+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_cv_prog_cxx_cxx98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx98_program
_ACEOF
for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx98=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX ;;
esac
fi

if test "x$ac_cv_prog_cxx_cxx98" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else case e in #(
  e) if test "x$ac_cv_prog_cxx_cxx98" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx98" ;;
esac
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
  ac_prog_cxx_stdcxx=cxx98 ;;
esac
fi
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
printf %s "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
  if test ${ac_cv_prog_CXXCPP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)     # Double quotes because $CXX needs to be expanded
    for CXXCPP in "$CXX -E" cpp /lib/cpp
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
  break
fi

    done
    ac_cv_prog_CXXCPP=$CXXCPP
   ;;
esac
fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
printf "%s\n" "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu



  case stdc++ in
  c|c_r) ;;
  *)
      LIBS="-lstdc++ $LIBS"
   ;;
  esac


  php_cxx_done=yes

fi

    ax_cxx_compile_alternatives="11 0x"  ax_cxx_compile_cxx11_required=true  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  ac_success=no

        for alternative in ${ax_cxx_compile_alternatives}; do
    for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
      cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | sed "$as_sed_sh"`
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; }
if eval test \${$cachevar+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_save_CXX="$CXX"
           CXX="$CXX $switch"
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.

#ifndef __cplusplus

#error "This is not a C++ compiler"

#elif __cplusplus < 201103L

#error "This is not a C++11 compiler"

#else

namespace cxx11
{

  namespace test_static_assert
  {

    template <typename T>
    struct check
    {
      static_assert(sizeof(int) <= sizeof(T), "not big enough");
    };

  }

  namespace test_final_override
  {

    struct Base
    {
      virtual ~Base() {}
      virtual void f() {}
    };

    struct Derived : public Base
    {
      virtual ~Derived() override {}
      virtual void f() override {}
    };

  }

  namespace test_double_right_angle_brackets
  {

    template < typename T >
    struct check {};

    typedef check<void> single_type;
    typedef check<check<void>> double_type;
    typedef check<check<check<void>>> triple_type;
    typedef check<check<check<check<void>>>> quadruple_type;

  }

  namespace test_decltype
  {

    int
    f()
    {
      int a = 1;
      decltype(a) b = 2;
      return a + b;
    }

  }

  namespace test_type_deduction
  {

    template < typename T1, typename T2 >
    struct is_same
    {
      static const bool value = false;
    };

    template < typename T >
    struct is_same<T, T>
    {
      static const bool value = true;
    };

    template < typename T1, typename T2 >
    auto
    add(T1 a1, T2 a2) -> decltype(a1 + a2)
    {
      return a1 + a2;
    }

    int
    test(const int c, volatile int v)
    {
      static_assert(is_same<int, decltype(0)>::value == true, "");
      static_assert(is_same<int, decltype(c)>::value == false, "");
      static_assert(is_same<int, decltype(v)>::value == false, "");
      auto ac = c;
      auto av = v;
      auto sumi = ac + av + 'x';
      auto sumf = ac + av + 1.0;
      static_assert(is_same<int, decltype(ac)>::value == true, "");
      static_assert(is_same<int, decltype(av)>::value == true, "");
      static_assert(is_same<int, decltype(sumi)>::value == true, "");
      static_assert(is_same<int, decltype(sumf)>::value == false, "");
      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
      return (sumf > 0.0) ? sumi : add(c, v);
    }

  }

  namespace test_noexcept
  {

    int f() { return 0; }
    int g() noexcept { return 0; }

    static_assert(noexcept(f()) == false, "");
    static_assert(noexcept(g()) == true, "");

  }

  namespace test_constexpr
  {

    template < typename CharT >
    unsigned long constexpr
    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
    {
      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
    }

    template < typename CharT >
    unsigned long constexpr
    strlen_c(const CharT *const s) noexcept
    {
      return strlen_c_r(s, 0UL);
    }

    static_assert(strlen_c("") == 0UL, "");
    static_assert(strlen_c("1") == 1UL, "");
    static_assert(strlen_c("example") == 7UL, "");
    static_assert(strlen_c("another\0example") == 7UL, "");

  }

  namespace test_rvalue_references
  {

    template < int N >
    struct answer
    {
      static constexpr int value = N;
    };

    answer<1> f(int&)       { return answer<1>(); }
    answer<2> f(const int&) { return answer<2>(); }
    answer<3> f(int&&)      { return answer<3>(); }

    void
    test()
    {
      int i = 0;
      const int c = 0;
      static_assert(decltype(f(i))::value == 1, "");
      static_assert(decltype(f(c))::value == 2, "");
      static_assert(decltype(f(0))::value == 3, "");
    }

  }

  namespace test_uniform_initialization
  {

    struct test
    {
      static const int zero {};
      static const int one {1};
    };

    static_assert(test::zero == 0, "");
    static_assert(test::one == 1, "");

  }

  namespace test_lambdas
  {

    void
    test1()
    {
      auto lambda1 = [](){};
      auto lambda2 = lambda1;
      lambda1();
      lambda2();
    }

    int
    test2()
    {
      auto a = [](int i, int j){ return i + j; }(1, 2);
      auto b = []() -> int { return '0'; }();
      auto c = [=](){ return a + b; }();
      auto d = [&](){ return c; }();
      auto e = [a, &b](int x) mutable {
        const auto identity = [](int y){ return y; };
        for (auto i = 0; i < a; ++i)
          a += b--;
        return x + identity(a + b);
      }(0);
      return a + b + c + d + e;
    }

    int
    test3()
    {
      const auto nullary = [](){ return 0; };
      const auto unary = [](int x){ return x; };
      using nullary_t = decltype(nullary);
      using unary_t = decltype(unary);
      const auto higher1st = [](nullary_t f){ return f(); };
      const auto higher2nd = [unary](nullary_t f1){
        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
      };
      return higher1st(nullary) + higher2nd(nullary)(unary);
    }

  }

  namespace test_variadic_templates
  {

    template <int...>
    struct sum;

    template <int N0, int... N1toN>
    struct sum<N0, N1toN...>
    {
      static constexpr auto value = N0 + sum<N1toN...>::value;
    };

    template <>
    struct sum<>
    {
      static constexpr auto value = 0;
    };

    static_assert(sum<>::value == 0, "");
    static_assert(sum<1>::value == 1, "");
    static_assert(sum<23>::value == 23, "");
    static_assert(sum<1, 2>::value == 3, "");
    static_assert(sum<5, 5, 11>::value == 21, "");
    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");

  }

  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
  // because of this.
  namespace test_template_alias_sfinae
  {

    struct foo {};

    template<typename T>
    using member = typename T::member_type;

    template<typename T>
    void func(...) {}

    template<typename T>
    void func(member<T>*) {}

    void test();

    void test() { func<foo>(0); }

  }

}  // namespace cxx11

#endif  // __cplusplus >= 201103L



_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  eval $cachevar=yes
else case e in #(
  e) eval $cachevar=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
           CXX="$ac_save_CXX" ;;
esac
fi
eval ac_res=\$$cachevar
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
      if eval test x\$$cachevar = xyes; then
        eval PHP_PDO_FIREBIRD_STDCXX="$switch"
        ac_success=yes
        break
      fi
    done
    if test x$ac_success = xyes; then
      break
    fi
  done

  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

  if test x$ax_cxx_compile_cxx11_required = xtrue; then
    if test x$ac_success = xno; then
      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
    fi
  fi
  if test x$ac_success = xno; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
printf "%s\n" "$as_me: No compiler with C++11 support was found" >&6;}
  fi



  PHP_PDO_FIREBIRD_CXX_SOURCES="pdo_firebird_utils.cpp"

  if test "x$ext_shared" = xno
then :


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in $PHP_PDO_FIREBIRD_CXX_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PDO_FIREBIRD_STDCXX -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PDO_FIREBIRD_STDCXX -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PDO_FIREBIRD_STDCXX -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $PHP_PDO_FIREBIRD_STDCXX -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


else case e in #(
  e)
  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in $PHP_PDO_FIREBIRD_CXX_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pdo_firebird="$shared_objects_pdo_firebird $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PDO_FIREBIRD_STDCXX -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PDO_FIREBIRD_STDCXX -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $PHP_PDO_FIREBIRD_STDCXX -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $PHP_PDO_FIREBIRD_STDCXX -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done
 ;;
esac
fi
fi





php_with_pdo_mysql=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MySQL support for PDO" >&5
printf %s "checking for MySQL support for PDO... " >&6; }

# Check whether --with-pdo-mysql was given.
if test ${with_pdo_mysql+y}
then :
  withval=$with_pdo_mysql; PHP_PDO_MYSQL=$withval
else case e in #(
  e)
  PHP_PDO_MYSQL=no
  test "$PHP_ENABLE_ALL" && PHP_PDO_MYSQL=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PDO_MYSQL in
shared,*)
  PHP_PDO_MYSQL=$(echo "$PHP_PDO_MYSQL"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PDO_MYSQL=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PDO_MYSQL" != "no"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MySQL Unix socket location" >&5
printf %s "checking for MySQL Unix socket location... " >&6; }
  case $PHP_MYSQL_SOCK in #(
  yes) :

  for i in  \
    /var/run/mysqld/mysqld.sock \
    /var/tmp/mysql.sock \
    /var/run/mysql/mysql.sock \
    /var/lib/mysql/mysql.sock \
    /var/mysql/mysql.sock \
    /usr/local/mysql/var/mysql.sock \
    /Private/tmp/mysql.sock \
    /private/tmp/mysql.sock \
    /tmp/mysql.sock \
  ; do
    if test -r $i; then
      MYSQL_SOCK=$i
      break
    fi
  done

  if ${MYSQL_SOCK:+false} :
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
else case e in #(
  e)

printf "%s\n" "#define PHP_MYSQL_UNIX_SOCK_ADDR \"$MYSQL_SOCK\"" >>confdefs.h

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MYSQL_SOCK" >&5
printf "%s\n" "$MYSQL_SOCK" >&6; }
   ;;
esac
fi
 ;; #(
  no) :
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;; #(
  *) :


printf "%s\n" "#define PHP_MYSQL_UNIX_SOCK_ADDR \"$PHP_MYSQL_SOCK\"" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PHP_MYSQL_SOCK" >&5
printf "%s\n" "$PHP_MYSQL_SOCK" >&6; }
     ;;
esac

    case $PHP_PDO_MYSQL in #(
  yes|mysqlnd) :

    PHP_MYSQLND_ENABLED=yes

printf "%s\n" "#define PDO_USE_MYSQLND 1" >>confdefs.h

   ;; #(
  *) :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mysql_config" >&5
printf %s "checking for mysql_config... " >&6; }
    if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
      PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
    else
      if test -d "$PHP_PDO_MYSQL" ; then
        if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
          PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
        else
          PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
        fi
      fi
    fi

    if test -n "$PDO_MYSQL_CONFIG"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PDO_MYSQL_CONFIG" >&5
printf "%s\n" "$PDO_MYSQL_CONFIG" >&6; }
      PDO_MYSQL_LIBS=$($PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g")
      PDO_MYSQL_INCLUDE=$($PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g")
      PDO_MYSQL_SOCKET=$($PDO_MYSQL_CONFIG --socket)

printf "%s\n" "#define PDO_MYSQL_UNIX_ADDR \"$PDO_MYSQL_SOCKET\"" >>confdefs.h

    elif test -n "$PDO_MYSQL_DIR"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
printf "%s\n" "not found" >&6; }
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mysql install under $PDO_MYSQL_DIR" >&5
printf %s "checking for mysql install under $PDO_MYSQL_DIR... " >&6; }
      if test -r $PDO_MYSQL_DIR/include/mysql; then
        PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include/mysql
      else
        PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include
      fi
      if test -r $PDO_MYSQL_DIR/$PHP_LIBDIR/mysql; then
        PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/$PHP_LIBDIR/mysql
      else
        PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/$PHP_LIBDIR
      fi

      if test -r "$PDO_MYSQL_LIB_DIR"; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libs under $PDO_MYSQL_LIB_DIR; seems promising" >&5
printf "%s\n" "libs under $PDO_MYSQL_LIB_DIR; seems promising" >&6; }
      else
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can not find it" >&5
printf "%s\n" "can not find it" >&6; }
        as_fn_error $? "Unable to find your mysql installation" "$LINENO" 5
      fi

      PDO_MYSQL_INCLUDE=-I$PDO_MYSQL_INC_DIR
      PDO_MYSQL_LIBS="-L$PDO_MYSQL_LIB_DIR -lmysqlclient"
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
printf "%s\n" "not found" >&6; }
      as_fn_error $? "Unable to find your mysql installation" "$LINENO" 5
    fi


  for ac_i in $PDO_MYSQL_INCLUDE; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $PDO_MYSQL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  PDO_MYSQL_SHARED_LIBADD="$PDO_MYSQL_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        PDO_MYSQL_SHARED_LIBADD="$PDO_MYSQL_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        PDO_MYSQL_SHARED_LIBADD="-L$ai_p $PDO_MYSQL_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && PDO_MYSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_MYSQL_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

   ;;
esac


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
printf %s "checking for PDO includes... " >&6; }
if test ${pdo_cv_inc_path+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    if test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$phpincludedir/ext
    fi
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pdo_cv_inc_path" >&5
printf "%s\n" "$pdo_cv_inc_path" >&6; }
  if test -n "$pdo_cv_inc_path"; then
:
  else
as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
  fi



  ext_builddir=ext/pdo_mysql
  ext_srcdir=$abs_srcdir/ext/pdo_mysql
  ext_dir=ext/pdo_mysql

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PDO_MYSQL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_mysql.c mysql_driver.c mysql_statement.c mysql_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pdo_mysql;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_mysql;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PDO_MYSQL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pdo_mysql.c mysql_driver.c mysql_statement.c mysql_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pdo_mysql="$shared_objects_pdo_mysql $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pdo_mysql.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pdo_mysql.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pdo_mysql"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pdo_mysql.$suffix: $ext_builddir/pdo_mysql.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pdo_mysql.$suffix \$(phplibdir)

$ext_builddir/pdo_mysql.$suffix: \$(shared_objects_pdo_mysql) \$(PDO_MYSQL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pdo_mysql) \$(PDO_MYSQL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PDO_MYSQL 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PDO_MYSQL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_mysql.c mysql_driver.c mysql_statement.c mysql_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pdo_mysql;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_mysql.c mysql_driver.c mysql_statement.c mysql_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_mysql;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pdo_mysql

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi



  am_i_shared=$PHP_PDO_MYSQL_SHARED
  is_it_shared=$PHP_PDO_SHARED
  is_it_enabled=$PHP_PDO
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pdo_mysql to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_mysql shared or build pdo statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pdo_mysql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
  fi

    src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments


  case $PHP_PDO_MYSQL in #(
  yes|mysqlnd) :


  am_i_shared=$PHP_PDO_MYSQL_SHARED
  is_it_shared=$PHP_MYSQLND_SHARED
  is_it_enabled=$PHP_MYSQLND
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pdo_mysql to build statically, but it
depends on extension mysqlnd, which you've configured to build shared.
You either need to build pdo_mysql shared or build mysqlnd statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pdo_mysql, which depends on extension mysqlnd,
but you've either not enabled mysqlnd, or have disabled it.
" "$LINENO" 5
  fi

   ;; #(
  *) :
     ;;
esac


  PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_MYSQL_SHARED_LIBADD"

fi







php_with_pdo_odbc=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ODBC v3 support for PDO" >&5
printf %s "checking for ODBC v3 support for PDO... " >&6; }

# Check whether --with-pdo-odbc was given.
if test ${with_pdo_odbc+y}
then :
  withval=$with_pdo_odbc; PHP_PDO_ODBC=$withval
else case e in #(
  e)
  PHP_PDO_ODBC=no
  test "$PHP_ENABLE_ALL" && PHP_PDO_ODBC=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PDO_ODBC in
shared,*)
  PHP_PDO_ODBC=$(echo "$PHP_PDO_ODBC"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PDO_ODBC=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }






if test "$PHP_PDO_ODBC" != "no"; then

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
printf %s "checking for PDO includes... " >&6; }
if test ${pdo_cv_inc_path+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    if test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$phpincludedir/ext
    fi
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pdo_cv_inc_path" >&5
printf "%s\n" "$pdo_cv_inc_path" >&6; }
  if test -n "$pdo_cv_inc_path"; then
:
  else
as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for selected PDO ODBC flavour" >&5
printf %s "checking for selected PDO ODBC flavour... " >&6; }

  pdo_odbc_flavour="$(echo $PHP_PDO_ODBC | cut -d, -f1)"
  pdo_odbc_dir="$(echo $PHP_PDO_ODBC | cut -d, -f2)"

  if test "$pdo_odbc_dir" = "$PHP_PDO_ODBC" ; then
    pdo_odbc_dir=
  fi

  case $pdo_odbc_flavour in #(
  ibm-db2) :

      pdo_odbc_def_libdir=/home/db2inst1/sqllib/lib
      pdo_odbc_def_incdir=/home/db2inst1/sqllib/include
      pdo_odbc_def_lib=db2
     ;; #(
  iODBC|iodbc) :
    pdo_odbc_pkgconfig_module=libiodbc ;; #(
  unixODBC|unixodbc) :
    pdo_odbc_pkgconfig_module=odbc ;; #(
  generic) :

      pdo_odbc_def_lib="$(echo $PHP_PDO_ODBC | cut -d, -f3)"
      pdo_odbc_def_ldflags="$(echo $PHP_PDO_ODBC | cut -d, -f4)"
      pdo_odbc_def_cflags="$(echo $PHP_PDO_ODBC | cut -d, -f5)"
      pdo_odbc_flavour="generic-$pdo_odbc_def_lib"
     ;; #(
  *) :
    as_fn_error $? "Unknown ODBC flavour $pdo_odbc_flavour
  The 'flavour' part determines what driver or driver manager to use; it can be
  either ibm-db2, iODBC, unixODBC, or generic.

  The include and lib dirs are looked for under 'dir'.  You may attempt to use
  an otherwise unsupported driver using the 'generic' flavour. The syntax for
  generic ODBC support is: --with-pdo-odbc=generic,dir,libname,ldflags,cflags.
  When built as 'shared' the extension filename is always 'pdo_odbc.so'.

  For unixODBC and iODBC, the 'dir' part is ignored and can be omitted, as
  pkg-config will be searched instead. For ibm-db2, it will search for the DB2
  driver at that path." "$LINENO" 5 ;;
esac

  if test -n "$pdo_odbc_pkgconfig_module"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pdo_odbc_flavour using pkg-config" >&5
printf "%s\n" "$pdo_odbc_flavour using pkg-config" >&6; }

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pdo_odbc_pkgconfig_module" >&5
printf %s "checking for $pdo_odbc_pkgconfig_module... " >&6; }

if test -n "$PDO_ODBC_CFLAGS"; then
    pkg_cv_PDO_ODBC_CFLAGS="$PDO_ODBC_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pdo_odbc_pkgconfig_module\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$pdo_odbc_pkgconfig_module") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PDO_ODBC_CFLAGS=`$PKG_CONFIG --cflags "$pdo_odbc_pkgconfig_module" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$PDO_ODBC_LIBS"; then
    pkg_cv_PDO_ODBC_LIBS="$PDO_ODBC_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pdo_odbc_pkgconfig_module\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$pdo_odbc_pkgconfig_module") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PDO_ODBC_LIBS=`$PKG_CONFIG --libs "$pdo_odbc_pkgconfig_module" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        PDO_ODBC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pdo_odbc_pkgconfig_module" 2>&1`
        else
	        PDO_ODBC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pdo_odbc_pkgconfig_module" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$PDO_ODBC_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements ($pdo_odbc_pkgconfig_module) were not met:

$PDO_ODBC_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PDO_ODBC_CFLAGS
and PDO_ODBC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables PDO_ODBC_CFLAGS
and PDO_ODBC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	PDO_ODBC_CFLAGS=$pkg_cv_PDO_ODBC_CFLAGS
	PDO_ODBC_LIBS=$pkg_cv_PDO_ODBC_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi
  else
    if ${pdo_odbc_dir:+false} :
then :

      PDO_ODBC_INCDIR=$pdo_odbc_def_incdir
      PDO_ODBC_LIBDIR=$pdo_odbc_def_libdir

else case e in #(
  e)
      PDO_ODBC_INCDIR="$pdo_odbc_dir/include"
      PDO_ODBC_LIBDIR="$pdo_odbc_dir/$PHP_LIBDIR"
     ;;
esac
fi

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pdo_odbc_flavour
            libs       $PDO_ODBC_LIBDIR,
            headers    $PDO_ODBC_INCDIR" >&5
printf "%s\n" "$pdo_odbc_flavour
            libs       $PDO_ODBC_LIBDIR,
            headers    $PDO_ODBC_INCDIR" >&6; }

    if test ! -d "$PDO_ODBC_LIBDIR" ; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: library dir $PDO_ODBC_LIBDIR does not exist" >&5
printf "%s\n" "$as_me: WARNING: library dir $PDO_ODBC_LIBDIR does not exist" >&2;}
    fi

    PDO_ODBC_CFLAGS="$pdo_odbc_def_cflags -I$PDO_ODBC_INCDIR"
    PDO_ODBC_LIBS="$pdo_odbc_def_ldflags -L$PDO_ODBC_LIBDIR -l$pdo_odbc_def_lib"


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PDO_ODBC_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$pdo_odbc_def_lib""_SQLBindCol" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5
printf %s "checking for SQLBindCol in -l$pdo_odbc_def_lib... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$pdo_odbc_def_lib  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char SQLBindCol (void);
int
main (void)
{
return SQLBindCol ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PDO_ODBC_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$pdo_odbc_def_lib""_SQLAllocHandle" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5
printf %s "checking for SQLAllocHandle in -l$pdo_odbc_def_lib... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$pdo_odbc_def_lib  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char SQLAllocHandle (void);
int
main (void)
{
return SQLAllocHandle ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$pdo_odbc_def_lib_SQLAllocHandle
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "
Your ODBC library does not appear to be ODBC 3 compatible.
You should consider using iODBC or unixODBC instead, and loading your
libraries as a driver in that environment; it will emulate the
functions required for PDO support.

See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$pdo_odbc_def_lib_SQLBindCol
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Your ODBC library does not exist or there was an error.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi

  fi


  for ac_i in $PDO_ODBC_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $PDO_ODBC_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  PDO_ODBC_SHARED_LIBADD="$PDO_ODBC_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        PDO_ODBC_SHARED_LIBADD="$PDO_ODBC_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        PDO_ODBC_SHARED_LIBADD="-L$ai_p $PDO_ODBC_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && PDO_ODBC_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_ODBC_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  OLD_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS $PDO_ODBC_CFLAGS"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cli0cli.h" >&5
printf %s "checking for cli0cli.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cli0cli.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_CLI0CLI_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cli0core.h" >&5
printf %s "checking for cli0core.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cli0core.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_CLI0CORE_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cli0defs.h" >&5
printf %s "checking for cli0defs.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cli0defs.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_CLI0DEFS_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cli0env.h" >&5
printf %s "checking for cli0env.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cli0env.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_CLI0ENV_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cli0ext.h" >&5
printf %s "checking for cli0ext.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cli0ext.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_CLI0EXT_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iodbc.h" >&5
printf %s "checking for iodbc.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <iodbc.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_IODBC_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isql.h" >&5
printf %s "checking for isql.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <isql.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_ISQL_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isqlext.h" >&5
printf %s "checking for isqlext.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <isqlext.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_ISQLEXT_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibraryManager.h" >&5
printf %s "checking for LibraryManager.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <LibraryManager.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_LIBRARYMANAGER_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for odbc.h" >&5
printf %s "checking for odbc.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <odbc.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_ODBC_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sql.h" >&5
printf %s "checking for sql.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sql.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_SQL_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlcli1.h" >&5
printf %s "checking for sqlcli1.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sqlcli1.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_SQLCLI1_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlext.h" >&5
printf %s "checking for sqlext.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sqlext.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_SQLEXT_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqltypes.h" >&5
printf %s "checking for sqltypes.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sqltypes.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_SQLTYPES_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlucode.h" >&5
printf %s "checking for sqlucode.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sqlucode.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_SQLUCODE_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlunix.h" >&5
printf %s "checking for sqlunix.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sqlunix.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_SQLUNIX_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for udbcext.h" >&5
printf %s "checking for udbcext.h... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <udbcext.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

    php_pdo_odbc_have_header=yes

printf "%s\n" "#define HAVE_UDBCEXT_H 1" >>confdefs.h

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  CPPFLAGS=$OLD_CPPFLAGS

  if test "x$php_pdo_odbc_have_header" = xyes
then :

else case e in #(
  e) as_fn_error $? "Cannot find header file(s) for pdo_odbc." "$LINENO" 5 ;;
esac
fi


printf "%s\n" "#define PDO_ODBC_TYPE \"$pdo_odbc_flavour\"" >>confdefs.h



  ext_builddir=ext/pdo_odbc
  ext_srcdir=$abs_srcdir/ext/pdo_odbc
  ext_dir=ext/pdo_odbc

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PDO_ODBC_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_odbc.c odbc_driver.c odbc_stmt.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pdo_odbc;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_odbc;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PDO_ODBC_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pdo_odbc.c odbc_driver.c odbc_stmt.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pdo_odbc="$shared_objects_pdo_odbc $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pdo_odbc.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pdo_odbc.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pdo_odbc"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pdo_odbc.$suffix: $ext_builddir/pdo_odbc.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pdo_odbc.$suffix \$(phplibdir)

$ext_builddir/pdo_odbc.$suffix: \$(shared_objects_pdo_odbc) \$(PDO_ODBC_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pdo_odbc) \$(PDO_ODBC_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PDO_ODBC 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PDO_ODBC_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_odbc.c odbc_driver.c odbc_stmt.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pdo_odbc;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_odbc.c odbc_driver.c odbc_stmt.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_odbc;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pdo_odbc

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_ODBC_SHARED_LIBADD"


  am_i_shared=$PHP_PDO_ODBC_SHARED
  is_it_shared=$PHP_PDO_SHARED
  is_it_enabled=$PHP_PDO
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pdo_odbc to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_odbc shared or build pdo statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pdo_odbc, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
  fi

fi





php_with_pdo_pgsql=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PostgreSQL support for PDO" >&5
printf %s "checking for PostgreSQL support for PDO... " >&6; }

# Check whether --with-pdo-pgsql was given.
if test ${with_pdo_pgsql+y}
then :
  withval=$with_pdo_pgsql; PHP_PDO_PGSQL=$withval
else case e in #(
  e)
  PHP_PDO_PGSQL=no
  test "$PHP_ENABLE_ALL" && PHP_PDO_PGSQL=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PDO_PGSQL in
shared,*)
  PHP_PDO_PGSQL=$(echo "$PHP_PDO_PGSQL"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PDO_PGSQL=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PDO_PGSQL" != "no"; then
  found_pgsql=no
case $PHP_PDO_PGSQL in #(
  yes) :
    pgsql_dir="" ;; #(
  *) :
    pgsql_dir=$PHP_PDO_PGSQL ;;
esac
if ${pgsql_dir:+false} :
then :

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpq >= 10.0" >&5
printf %s "checking for libpq >= 10.0... " >&6; }

if test -n "$PGSQL_CFLAGS"; then
    pkg_cv_PGSQL_CFLAGS="$PGSQL_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq >= 10.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpq >= 10.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PGSQL_CFLAGS=`$PKG_CONFIG --cflags "libpq >= 10.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$PGSQL_LIBS"; then
    pkg_cv_PGSQL_LIBS="$PGSQL_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq >= 10.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpq >= 10.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PGSQL_LIBS=`$PKG_CONFIG --libs "libpq >= 10.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        PGSQL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpq >= 10.0" 2>&1`
        else
	        PGSQL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpq >= 10.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$PGSQL_PKG_ERRORS" >&5

	found_pgsql=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	found_pgsql=no
else
	PGSQL_CFLAGS=$pkg_cv_PGSQL_CFLAGS
	PGSQL_LIBS=$pkg_cv_PGSQL_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	found_pgsql=yes
fi
fi

if test "x$found_pgsql" = xno
then :
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pg_config" >&5
printf %s "checking for pg_config... " >&6; }
  for i in $pgsql_dir $pgsql_dir/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
    if test -x $i/pg_config
then :
  PG_CONFIG="$i/pg_config"; break;
fi
  done

  if ${PG_CONFIG:+false} :
then :
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
printf "%s\n" "not found" >&6; }
    if ${pgsql_dir:+false} :
then :
  pgsql_search_paths="/usr /usr/local /usr/local/pgsql"
else case e in #(
  e) pgsql_search_paths=$pgsql_dir ;;
esac
fi

    for i in $pgsql_search_paths; do
      for j in include include/pgsql include/postgres include/postgresql ""; do
        if test -r "$i/$j/libpq-fe.h"
then :
  PGSQL_INCLUDE=$i/$j
fi
      done

      for j in $PHP_LIBDIR lib $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do
        if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"
then :
  PGSQL_LIBDIR=$i/$j
fi
      done
    done

else case e in #(
  e)     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
printf "%s\n" "$PG_CONFIG" >&6; }
    PGSQL_INCLUDE=$($PG_CONFIG --includedir)
    PGSQL_LIBDIR=$($PG_CONFIG --libdir)
   ;;
esac
fi

  if test -n "$PGSQL_INCLUDE" && test -n "PGSQL_LIBDIR"
then :

    found_pgsql=yes
    PGSQL_CFLAGS="-I$PGSQL_INCLUDE"
    PGSQL_LIBS="-L$PGSQL_LIBDIR -lpq"

fi
fi

if test "x$found_pgsql" = xyes
then :

  for ac_i in $PGSQL_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $PGSQL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  PDO_PGSQL_SHARED_LIBADD="$PDO_PGSQL_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        PDO_PGSQL_SHARED_LIBADD="$PDO_PGSQL_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        PDO_PGSQL_SHARED_LIBADD="-L$ai_p $PDO_PGSQL_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && PDO_PGSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_PGSQL_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQencryptPasswordConn in -lpq" >&5
printf %s "checking for PQencryptPasswordConn in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQencryptPasswordConn+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQencryptPasswordConn (void);
int
main (void)
{
return PQencryptPasswordConn ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQencryptPasswordConn=yes
else case e in #(
  e) ac_cv_lib_pq_PQencryptPasswordConn=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQencryptPasswordConn" >&5
printf "%s\n" "$ac_cv_lib_pq_PQencryptPasswordConn" >&6; }
if test "x$ac_cv_lib_pq_PQencryptPasswordConn" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQencryptPasswordConn
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "PostgreSQL check failed: libpq 10.0 or later is required.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi


else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Cannot find libpq-fe.h or pq library (libpq). Please specify the correct
PostgreSQL installation path with environment variables PGSQL_CFLAGS and
PGSQL_LIBS or provide the PostgreSQL installation directory.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_PGSQL_SHARED_LIBADD"



printf "%s\n" "#define HAVE_PDO_PGSQL 1" >>confdefs.h



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQresultMemorySize in -lpq" >&5
printf %s "checking for PQresultMemorySize in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQresultMemorySize+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQresultMemorySize (void);
int
main (void)
{
return PQresultMemorySize ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQresultMemorySize=yes
else case e in #(
  e) ac_cv_lib_pq_PQresultMemorySize=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQresultMemorySize" >&5
printf "%s\n" "$ac_cv_lib_pq_PQresultMemorySize" >&6; }
if test "x$ac_cv_lib_pq_PQresultMemorySize" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PG_RESULT_MEMORY_SIZE 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQresultMemorySize

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQclosePrepared in -lpq" >&5
printf %s "checking for PQclosePrepared in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQclosePrepared+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQclosePrepared (void);
int
main (void)
{
return PQclosePrepared ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQclosePrepared=yes
else case e in #(
  e) ac_cv_lib_pq_PQclosePrepared=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQclosePrepared" >&5
printf "%s\n" "$ac_cv_lib_pq_PQclosePrepared" >&6; }
if test "x$ac_cv_lib_pq_PQclosePrepared" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PQCLOSEPREPARED 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQclosePrepared

   ;;
esac
fi



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
printf %s "checking for PDO includes... " >&6; }
if test ${pdo_cv_inc_path+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    if test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$phpincludedir/ext
    fi
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pdo_cv_inc_path" >&5
printf "%s\n" "$pdo_cv_inc_path" >&6; }
  if test -n "$pdo_cv_inc_path"; then
:
  else
as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
  fi



  ext_builddir=ext/pdo_pgsql
  ext_srcdir=$abs_srcdir/ext/pdo_pgsql
  ext_dir=ext/pdo_pgsql

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PDO_PGSQL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_pgsql.c pgsql_driver.c pgsql_statement.c pgsql_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pdo_pgsql;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_pgsql;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PDO_PGSQL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pdo_pgsql.c pgsql_driver.c pgsql_statement.c pgsql_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pdo_pgsql="$shared_objects_pdo_pgsql $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pdo_pgsql.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pdo_pgsql.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pdo_pgsql"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pdo_pgsql.$suffix: $ext_builddir/pdo_pgsql.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pdo_pgsql.$suffix \$(phplibdir)

$ext_builddir/pdo_pgsql.$suffix: \$(shared_objects_pdo_pgsql) \$(PDO_PGSQL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pdo_pgsql) \$(PDO_PGSQL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PDO_PGSQL 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PDO_PGSQL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_pgsql.c pgsql_driver.c pgsql_statement.c pgsql_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pdo_pgsql;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_pgsql.c pgsql_driver.c pgsql_statement.c pgsql_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_pgsql;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pdo_pgsql

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_PDO_PGSQL_SHARED
  is_it_shared=$PHP_PDO_SHARED
  is_it_enabled=$PHP_PDO
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pdo_pgsql to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_pgsql shared or build pdo statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pdo_pgsql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
  fi

    src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

fi





php_with_pdo_sqlite=$PHP_PDO

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite 3 support for PDO" >&5
printf %s "checking for sqlite 3 support for PDO... " >&6; }

# Check whether --with-pdo-sqlite was given.
if test ${with_pdo_sqlite+y}
then :
  withval=$with_pdo_sqlite; PHP_PDO_SQLITE=$withval
else case e in #(
  e)
  PHP_PDO_SQLITE=$PHP_PDO
  test "$PHP_ENABLE_ALL" && PHP_PDO_SQLITE=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PDO_SQLITE in
shared,*)
  PHP_PDO_SQLITE=$(echo "$PHP_PDO_SQLITE"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PDO_SQLITE=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PDO_SQLITE" != "no"; then

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
printf %s "checking for PDO includes... " >&6; }
if test ${pdo_cv_inc_path+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    if test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$phpincludedir/ext
    fi
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pdo_cv_inc_path" >&5
printf "%s\n" "$pdo_cv_inc_path" >&6; }
  if test -n "$pdo_cv_inc_path"; then
:
  else
as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
  fi




pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3 >= 3.7.17" >&5
printf %s "checking for sqlite3 >= 3.7.17... " >&6; }

if test -n "$SQLITE_CFLAGS"; then
    pkg_cv_SQLITE_CFLAGS="$SQLITE_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3 >= 3.7.17\""; } >&5
  ($PKG_CONFIG --exists --print-errors "sqlite3 >= 3.7.17") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SQLITE_CFLAGS=`$PKG_CONFIG --cflags "sqlite3 >= 3.7.17" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$SQLITE_LIBS"; then
    pkg_cv_SQLITE_LIBS="$SQLITE_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3 >= 3.7.17\""; } >&5
  ($PKG_CONFIG --exists --print-errors "sqlite3 >= 3.7.17") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SQLITE_LIBS=`$PKG_CONFIG --libs "sqlite3 >= 3.7.17" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        SQLITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sqlite3 >= 3.7.17" 2>&1`
        else
	        SQLITE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sqlite3 >= 3.7.17" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$SQLITE_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (sqlite3 >= 3.7.17) were not met:

$SQLITE_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SQLITE_CFLAGS
and SQLITE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables SQLITE_CFLAGS
and SQLITE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	SQLITE_CFLAGS=$pkg_cv_SQLITE_CFLAGS
	SQLITE_LIBS=$pkg_cv_SQLITE_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }


  for ac_i in $SQLITE_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $SQLITE_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  PDO_SQLITE_SHARED_LIBADD="$PDO_SQLITE_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        PDO_SQLITE_SHARED_LIBADD="$PDO_SQLITE_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        PDO_SQLITE_SHARED_LIBADD="-L$ai_p $PDO_SQLITE_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && PDO_SQLITE_SHARED_LIBADD="$ld_runpath_switch$ai_p $PDO_SQLITE_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PDO_SQLITE_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_close_v2 in -lsqlite3" >&5
printf %s "checking for sqlite3_close_v2 in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_close_v2+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_close_v2 (void);
int
main (void)
{
return sqlite3_close_v2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sqlite3_sqlite3_close_v2=yes
else case e in #(
  e) ac_cv_lib_sqlite3_sqlite3_close_v2=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_close_v2" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_close_v2" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_close_v2" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_SQLITE3_CLOSE_V2 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_sqlite3_sqlite3_close_v2

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PDO_SQLITE_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_column_table_name in -lsqlite3" >&5
printf %s "checking for sqlite3_column_table_name in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_column_table_name+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_column_table_name (void);
int
main (void)
{
return sqlite3_column_table_name ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sqlite3_sqlite3_column_table_name=yes
else case e in #(
  e) ac_cv_lib_sqlite3_sqlite3_column_table_name=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_column_table_name" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_column_table_name" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_column_table_name" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_SQLITE3_COLUMN_TABLE_NAME 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_sqlite3_sqlite3_column_table_name

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PDO_SQLITE_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_load_extension in -lsqlite3" >&5
printf %s "checking for sqlite3_load_extension in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_load_extension+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_load_extension (void);
int
main (void)
{
return sqlite3_load_extension ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sqlite3_sqlite3_load_extension=yes
else case e in #(
  e) ac_cv_lib_sqlite3_sqlite3_load_extension=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_load_extension" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_load_extension" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_sqlite3_sqlite3_load_extension

printf "%s\n" "#define PDO_SQLITE_OMIT_LOAD_EXTENSION 1" >>confdefs.h

   ;;
esac
fi



  PHP_VAR_SUBST="$PHP_VAR_SUBST PDO_SQLITE_SHARED_LIBADD"


  ext_builddir=ext/pdo_sqlite
  ext_srcdir=$abs_srcdir/ext/pdo_sqlite
  ext_dir=ext/pdo_sqlite

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PDO_SQLITE_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_sqlite.c sqlite_driver.c sqlite_statement.c sqlite_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pdo_sqlite;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_sqlite;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PDO_SQLITE_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pdo_sqlite.c sqlite_driver.c sqlite_statement.c sqlite_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pdo_sqlite="$shared_objects_pdo_sqlite $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pdo_sqlite.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pdo_sqlite.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pdo_sqlite"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pdo_sqlite.$suffix: $ext_builddir/pdo_sqlite.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pdo_sqlite.$suffix \$(phplibdir)

$ext_builddir/pdo_sqlite.$suffix: \$(shared_objects_pdo_sqlite) \$(PDO_SQLITE_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pdo_sqlite) \$(PDO_SQLITE_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PDO_SQLITE 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PDO_SQLITE_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_sqlite.c sqlite_driver.c sqlite_statement.c sqlite_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pdo_sqlite;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pdo_sqlite.c sqlite_driver.c sqlite_statement.c sqlite_sql_parser.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pdo_sqlite;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pdo_sqlite

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi



  am_i_shared=$PHP_PDO_SQLITE_SHARED
  is_it_shared=$PHP_PDO_SHARED
  is_it_enabled=$PHP_PDO
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pdo_sqlite to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_sqlite shared or build pdo statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pdo_sqlite, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
  fi

    src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

fi





php_with_pgsql=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PostgreSQL support" >&5
printf %s "checking for PostgreSQL support... " >&6; }

# Check whether --with-pgsql was given.
if test ${with_pgsql+y}
then :
  withval=$with_pgsql; PHP_PGSQL=$withval
else case e in #(
  e)
  PHP_PGSQL=no
  test "$PHP_ENABLE_ALL" && PHP_PGSQL=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PGSQL in
shared,*)
  PHP_PGSQL=$(echo "$PHP_PGSQL"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PGSQL=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PGSQL" != "no"; then
  found_pgsql=no
case $PHP_PGSQL in #(
  yes) :
    pgsql_dir="" ;; #(
  *) :
    pgsql_dir=$PHP_PGSQL ;;
esac
if ${pgsql_dir:+false} :
then :

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpq >= 10.0" >&5
printf %s "checking for libpq >= 10.0... " >&6; }

if test -n "$PGSQL_CFLAGS"; then
    pkg_cv_PGSQL_CFLAGS="$PGSQL_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq >= 10.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpq >= 10.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PGSQL_CFLAGS=`$PKG_CONFIG --cflags "libpq >= 10.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$PGSQL_LIBS"; then
    pkg_cv_PGSQL_LIBS="$PGSQL_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq >= 10.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpq >= 10.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PGSQL_LIBS=`$PKG_CONFIG --libs "libpq >= 10.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        PGSQL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpq >= 10.0" 2>&1`
        else
	        PGSQL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpq >= 10.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$PGSQL_PKG_ERRORS" >&5

	found_pgsql=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	found_pgsql=no
else
	PGSQL_CFLAGS=$pkg_cv_PGSQL_CFLAGS
	PGSQL_LIBS=$pkg_cv_PGSQL_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	found_pgsql=yes
fi
fi

if test "x$found_pgsql" = xno
then :
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pg_config" >&5
printf %s "checking for pg_config... " >&6; }
  for i in $pgsql_dir $pgsql_dir/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
    if test -x $i/pg_config
then :
  PG_CONFIG="$i/pg_config"; break;
fi
  done

  if ${PG_CONFIG:+false} :
then :
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
printf "%s\n" "not found" >&6; }
    if ${pgsql_dir:+false} :
then :
  pgsql_search_paths="/usr /usr/local /usr/local/pgsql"
else case e in #(
  e) pgsql_search_paths=$pgsql_dir ;;
esac
fi

    for i in $pgsql_search_paths; do
      for j in include include/pgsql include/postgres include/postgresql ""; do
        if test -r "$i/$j/libpq-fe.h"
then :
  PGSQL_INCLUDE=$i/$j
fi
      done

      for j in $PHP_LIBDIR lib $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do
        if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"
then :
  PGSQL_LIBDIR=$i/$j
fi
      done
    done

else case e in #(
  e)     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
printf "%s\n" "$PG_CONFIG" >&6; }
    PGSQL_INCLUDE=$($PG_CONFIG --includedir)
    PGSQL_LIBDIR=$($PG_CONFIG --libdir)
   ;;
esac
fi

  if test -n "$PGSQL_INCLUDE" && test -n "PGSQL_LIBDIR"
then :

    found_pgsql=yes
    PGSQL_CFLAGS="-I$PGSQL_INCLUDE"
    PGSQL_LIBS="-L$PGSQL_LIBDIR -lpq"

fi
fi

if test "x$found_pgsql" = xyes
then :

  for ac_i in $PGSQL_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $PGSQL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  PGSQL_SHARED_LIBADD="$PGSQL_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        PGSQL_SHARED_LIBADD="$PGSQL_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        PGSQL_SHARED_LIBADD="-L$ai_p $PGSQL_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && PGSQL_SHARED_LIBADD="$ld_runpath_switch$ai_p $PGSQL_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQencryptPasswordConn in -lpq" >&5
printf %s "checking for PQencryptPasswordConn in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQencryptPasswordConn+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQencryptPasswordConn (void);
int
main (void)
{
return PQencryptPasswordConn ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQencryptPasswordConn=yes
else case e in #(
  e) ac_cv_lib_pq_PQencryptPasswordConn=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQencryptPasswordConn" >&5
printf "%s\n" "$ac_cv_lib_pq_PQencryptPasswordConn" >&6; }
if test "x$ac_cv_lib_pq_PQencryptPasswordConn" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQencryptPasswordConn
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "PostgreSQL check failed: libpq 10.0 or later is required.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi


else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Cannot find libpq-fe.h or pq library (libpq). Please specify the correct
PostgreSQL installation path with environment variables PGSQL_CFLAGS and
PGSQL_LIBS or provide the PostgreSQL installation directory.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST PGSQL_SHARED_LIBADD"



printf "%s\n" "#define HAVE_PGSQL 1" >>confdefs.h



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQresultMemorySize in -lpq" >&5
printf %s "checking for PQresultMemorySize in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQresultMemorySize+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQresultMemorySize (void);
int
main (void)
{
return PQresultMemorySize ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQresultMemorySize=yes
else case e in #(
  e) ac_cv_lib_pq_PQresultMemorySize=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQresultMemorySize" >&5
printf "%s\n" "$ac_cv_lib_pq_PQresultMemorySize" >&6; }
if test "x$ac_cv_lib_pq_PQresultMemorySize" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PG_RESULT_MEMORY_SIZE 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQresultMemorySize

   ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQchangePassword in -lpq" >&5
printf %s "checking for PQchangePassword in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQchangePassword+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQchangePassword (void);
int
main (void)
{
return PQchangePassword ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQchangePassword=yes
else case e in #(
  e) ac_cv_lib_pq_PQchangePassword=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQchangePassword" >&5
printf "%s\n" "$ac_cv_lib_pq_PQchangePassword" >&6; }
if test "x$ac_cv_lib_pq_PQchangePassword" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PG_CHANGE_PASSWORD 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQchangePassword

   ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQsocketPoll in -lpq" >&5
printf %s "checking for PQsocketPoll in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQsocketPoll+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQsocketPoll (void);
int
main (void)
{
return PQsocketPoll ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQsocketPoll=yes
else case e in #(
  e) ac_cv_lib_pq_PQsocketPoll=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsocketPoll" >&5
printf "%s\n" "$ac_cv_lib_pq_PQsocketPoll" >&6; }
if test "x$ac_cv_lib_pq_PQsocketPoll" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PG_SOCKET_POLL 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQsocketPoll

   ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQclosePrepared in -lpq" >&5
printf %s "checking for PQclosePrepared in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQclosePrepared+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQclosePrepared (void);
int
main (void)
{
return PQclosePrepared ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQclosePrepared=yes
else case e in #(
  e) ac_cv_lib_pq_PQclosePrepared=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQclosePrepared" >&5
printf "%s\n" "$ac_cv_lib_pq_PQclosePrepared" >&6; }
if test "x$ac_cv_lib_pq_PQclosePrepared" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PG_CLOSE_STMT 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQclosePrepared

   ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQservice in -lpq" >&5
printf %s "checking for PQservice in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQservice+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQservice (void);
int
main (void)
{
return PQservice ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQservice=yes
else case e in #(
  e) ac_cv_lib_pq_PQservice=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQservice" >&5
printf "%s\n" "$ac_cv_lib_pq_PQservice" >&6; }
if test "x$ac_cv_lib_pq_PQservice" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PG_SERVICE 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQservice

   ;;
esac
fi


  old_CFLAGS=$CFLAGS
  CFLAGS="$CFLAGS $PGSQL_CFLAGS"

  ac_fn_check_decl "$LINENO" "PGRES_TUPLES_CHUNK" "ac_cv_have_decl_PGRES_TUPLES_CHUNK" "#include <libpq-fe.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_PGRES_TUPLES_CHUNK" = xyes
then :
  ac_have_decl=1
else case e in #(
  e) ac_have_decl=0 ;;
esac
fi
printf "%s\n" "#define HAVE_DECL_PGRES_TUPLES_CHUNK $ac_have_decl" >>confdefs.h
if test $ac_have_decl = 1
then :

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$PGSQL_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/^a-zA-Z0-9/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/^a-zA-Z0-9/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*^/^/*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/^a-zA-Z0-9/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PQsetChunkedRowsMode in -lpq" >&5
printf %s "checking for PQsetChunkedRowsMode in -lpq... " >&6; }
if test ${ac_cv_lib_pq_PQsetChunkedRowsMode+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpq  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char PQsetChunkedRowsMode (void);
int
main (void)
{
return PQsetChunkedRowsMode ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_pq_PQsetChunkedRowsMode=yes
else case e in #(
  e) ac_cv_lib_pq_PQsetChunkedRowsMode=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsetChunkedRowsMode" >&5
printf "%s\n" "$ac_cv_lib_pq_PQsetChunkedRowsMode" >&6; }
if test "x$ac_cv_lib_pq_PQsetChunkedRowsMode" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PG_SET_CHUNKED_ROWS_SIZE 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_pq_PQsetChunkedRowsMode

   ;;
esac
fi

fi


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if PGVerbosity enum has PQERRORS_SQLSTATE" >&5
printf %s "checking if PGVerbosity enum has PQERRORS_SQLSTATE... " >&6; }
if test ${php_cv_enum_pgverbosity_pqerrors_sqlstate+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libpq-fe.h>
int
main (void)
{
PGVerbosity e = PQERRORS_SQLSTATE; (void)e;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_enum_pgverbosity_pqerrors_sqlstate=yes
else case e in #(
  e) php_cv_enum_pgverbosity_pqerrors_sqlstate=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_enum_pgverbosity_pqerrors_sqlstate" >&5
printf "%s\n" "$php_cv_enum_pgverbosity_pqerrors_sqlstate" >&6; }
  if test "x$php_cv_enum_pgverbosity_pqerrors_sqlstate" = xyes
then :

printf "%s\n" "#define HAVE_PQERRORS_SQLSTATE 1" >>confdefs.h

fi

  CFLAGS=$old_CFLAGS


  ext_builddir=ext/pgsql
  ext_srcdir=$abs_srcdir/ext/pgsql
  ext_dir=ext/pgsql

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PGSQL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pgsql.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC pgsql;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC pgsql;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PGSQL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in pgsql.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_pgsql="$shared_objects_pgsql $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/pgsql.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/pgsql.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_pgsql"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/pgsql.$suffix: $ext_builddir/pgsql.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/pgsql.$suffix \$(phplibdir)

$ext_builddir/pgsql.$suffix: \$(shared_objects_pgsql) \$(PGSQL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_pgsql) \$(PGSQL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PGSQL 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PGSQL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pgsql.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC pgsql;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in pgsql.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC pgsql;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=pgsql

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_PGSQL_SHARED
  is_it_shared=$PHP_PCRE_SHARED
  is_it_enabled=$PHP_PCRE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension pgsql to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build pgsql shared or build pcre statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension pgsql, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
  fi

fi





php_enable_phar=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for phar archive support" >&5
printf %s "checking for phar archive support... " >&6; }
# Check whether --enable-phar was given.
if test ${enable_phar+y}
then :
  enableval=$enable_phar; PHP_PHAR=$enableval
else case e in #(
  e)
  PHP_PHAR=yes
  test "$PHP_ENABLE_ALL" && PHP_PHAR=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PHAR in
shared,*)
  PHP_PHAR=$(echo "$PHP_PHAR"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PHAR=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_PHAR" != "no"; then

  ext_builddir=ext/phar
  ext_srcdir=$abs_srcdir/ext/phar
  ext_dir=ext/phar

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_PHAR_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dirstream.c func_interceptors.c phar_object.c phar_path_check.c phar.c stream.c tar.c util.c zip.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC phar;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC phar;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_PHAR_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in dirstream.c func_interceptors.c phar_object.c phar_path_check.c phar.c stream.c tar.c util.c zip.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_phar="$shared_objects_phar $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phar.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/phar.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_phar"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/phar.$suffix: $ext_builddir/phar.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/phar.$suffix \$(phplibdir)

$ext_builddir/phar.$suffix: \$(shared_objects_phar) \$(PHAR_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_phar) \$(PHAR_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_PHAR 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_PHAR_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dirstream.c func_interceptors.c phar_object.c phar_path_check.c phar.c stream.c tar.c util.c zip.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC phar;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in dirstream.c func_interceptors.c phar_object.c phar_path_check.c phar.c stream.c tar.c util.c zip.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC phar;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=phar

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for phar openssl support" >&5
printf %s "checking for phar openssl support... " >&6; }
  if test "x$PHP_OPENSSL_SHARED" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (shared openssl)" >&5
printf "%s\n" "no (shared openssl)" >&6; }
else case e in #(
  e) if test "x$PHP_OPENSSL" = xyes
then :

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

printf "%s\n" "#define PHAR_HAVE_OPENSSL 1" >>confdefs.h


else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
esac
fi ;;
esac
fi


  am_i_shared=$PHP_PHAR_SHARED
  is_it_shared=$PHP_HASH_SHARED
  is_it_enabled=$PHP_HASH
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension phar to build statically, but it
depends on extension hash, which you've configured to build shared.
You either need to build phar shared or build hash statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension phar, which depends on extension hash,
but you've either not enabled hash, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_PHAR_SHARED
  is_it_shared=$PHP_SPL_SHARED
  is_it_enabled=$PHP_SPL
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension phar to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build phar shared or build spl statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension phar, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
  fi

    src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments


  ac_config_files="$ac_config_files $ext_dir/phar.1 $ext_dir/phar.phar.1"

fi





php_enable_posix=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable POSIX-like functions" >&5
printf %s "checking whether to enable POSIX-like functions... " >&6; }
# Check whether --enable-posix was given.
if test ${enable_posix+y}
then :
  enableval=$enable_posix; PHP_POSIX=$enableval
else case e in #(
  e)
  PHP_POSIX=yes
  test "$PHP_ENABLE_ALL" && PHP_POSIX=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_POSIX in
shared,*)
  PHP_POSIX=$(echo "$PHP_POSIX"|$SED 's/^shared,//')
  ;;
shared)
  PHP_POSIX=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_POSIX" = "yes"; then

printf "%s\n" "#define HAVE_POSIX 1" >>confdefs.h


  ext_builddir=ext/posix
  ext_srcdir=$abs_srcdir/ext/posix
  ext_dir=ext/posix

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_POSIX_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in posix.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC posix;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC posix;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_POSIX_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in posix.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_posix="$shared_objects_posix $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/posix.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/posix.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_posix"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/posix.$suffix: $ext_builddir/posix.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/posix.$suffix \$(phplibdir)

$ext_builddir/posix.$suffix: \$(shared_objects_posix) \$(POSIX_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_posix) \$(POSIX_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_POSIX 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_POSIX_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in posix.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC posix;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in posix.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC posix;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=posix

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  ac_fn_c_check_func "$LINENO" "ctermid" "ac_cv_func_ctermid"
if test "x$ac_cv_func_ctermid" = xyes
then :
  printf "%s\n" "#define HAVE_CTERMID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
if test "x$ac_cv_func_eaccess" = xyes
then :
  printf "%s\n" "#define HAVE_EACCESS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r"
if test "x$ac_cv_func_getgrgid_r" = xyes
then :
  printf "%s\n" "#define HAVE_GETGRGID_R 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
if test "x$ac_cv_func_getgroups" = xyes
then :
  printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getlogin" "ac_cv_func_getlogin"
if test "x$ac_cv_func_getlogin" = xyes
then :
  printf "%s\n" "#define HAVE_GETLOGIN 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
if test "x$ac_cv_func_getpgid" = xyes
then :
  printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
if test "x$ac_cv_func_getrlimit" = xyes
then :
  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getsid" "ac_cv_func_getsid"
if test "x$ac_cv_func_getsid" = xyes
then :
  printf "%s\n" "#define HAVE_GETSID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
if test "x$ac_cv_func_initgroups" = xyes
then :
  printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
if test "x$ac_cv_func_mkfifo" = xyes
then :
  printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "mknod" "ac_cv_func_mknod"
if test "x$ac_cv_func_mknod" = xyes
then :
  printf "%s\n" "#define HAVE_MKNOD 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
if test "x$ac_cv_func_setegid" = xyes
then :
  printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
if test "x$ac_cv_func_seteuid" = xyes
then :
  printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
if test "x$ac_cv_func_setrlimit" = xyes
then :
  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
if test "x$ac_cv_func_setsid" = xyes
then :
  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h

fi



  for ac_func in makedev
do :
  ac_fn_c_check_func "$LINENO" "makedev" "ac_cv_func_makedev"
if test "x$ac_cv_func_makedev" = xyes
then :
  printf "%s\n" "#define HAVE_MAKEDEV 1" >>confdefs.h

else case e in #(
  e) ac_fn_check_decl "$LINENO" "makedev" "ac_cv_have_decl_makedev" "
      #include <sys/types.h>
      #ifdef MAJOR_IN_MKDEV
      # include <sys/mkdev.h>
      #elif defined(MAJOR_IN_SYSMACROS)
      # include <sys/sysmacros.h>
      #endif

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_makedev" = xyes
then :
  printf "%s\n" "#define HAVE_MAKEDEV 1" >>confdefs.h

fi ;;
esac
fi

done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking C standard library implementation" >&5
printf %s "checking C standard library implementation... " >&6; }
if test ${php_cv_c_standard_library+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) php_cv_c_standard_library=unknown
if test "x$php_cv_c_standard_library" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <features.h>
int
main (void)
{
#ifndef __UCLIBC__
  (void) __UCLIBC__;
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_c_standard_library=uclibc
else case e in #(
  e) php_cv_c_standard_library=unknown ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
if test "x$php_cv_c_standard_library" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <features.h>
int
main (void)
{
#ifndef __GLIBC__
  (void) __GLIBC__;
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_c_standard_library=glibc
else case e in #(
  e) php_cv_c_standard_library=unknown ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
if test "x$php_cv_c_standard_library" = xunknown
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdarg.h>
int
main (void)
{
#ifndef __DEFINED_va_list
  (void) __DEFINED_va_list;
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_c_standard_library=musl
else case e in #(
  e) if command -v ldd >/dev/null && ldd --version 2>&1 | grep ^musl >/dev/null 2>&1
then :
  php_cv_c_standard_library=musl
else case e in #(
  e) php_cv_c_standard_library=unknown ;;
esac
fi ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_c_standard_library" >&5
printf "%s\n" "$php_cv_c_standard_library" >&6; }

  if test "x$php_cv_c_standard_library" = xmusl
then :

else case e in #(
  e) ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
if test "x$ac_cv_func_pathconf" = xyes
then :
  printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf"
if test "x$ac_cv_func_fpathconf" = xyes
then :
  printf "%s\n" "#define HAVE_FPATHCONF 1" >>confdefs.h

fi
 ;;
esac
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working ttyname_r() implementation" >&5
printf %s "checking for working ttyname_r() implementation... " >&6; }
if test ${php_cv_func_ttyname_r+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_fn_c_check_func "$LINENO" "ttyname_r" "ac_cv_func_ttyname_r"
if test "x$ac_cv_func_ttyname_r" = xyes
then :
  php_cv_func_ttyname_r=yes
else case e in #(
  e) php_cv_func_ttyname_r=no ;;
esac
fi

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
int
main (void)
{

      char buf[64];
      return !ttyname_r(0, buf, 64);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_ttyname_r=yes
else case e in #(
  e) php_cv_func_ttyname_r=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_ttyname_r" >&5
printf "%s\n" "$php_cv_func_ttyname_r" >&6; }
  if test "x$php_cv_func_ttyname_r" = xyes
then :

printf "%s\n" "#define HAVE_TTYNAME_R 1" >>confdefs.h

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: posix_ttyname() will be thread-unsafe" >&5
printf "%s\n" "$as_me: posix_ttyname() will be thread-unsafe" >&6;} ;;
esac
fi

  ac_fn_c_check_member "$LINENO" "struct utsname" "domainname" "ac_cv_member_struct_utsname_domainname" "
    #ifndef _GNU_SOURCE
    #define _GNU_SOURCE
    #endif
    #include <sys/utsname.h>

"
if test "x$ac_cv_member_struct_utsname_domainname" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1" >>confdefs.h


fi

fi




ac_fn_check_decl "$LINENO" "arc4random_buf" "ac_cv_have_decl_arc4random_buf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_arc4random_buf" = xyes
then :

printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h

fi

ac_fn_c_check_header_compile "$LINENO" "CommonCrypto/CommonRandom.h" "ac_cv_header_CommonCrypto_CommonRandom_h" "  #include <sys/types.h>
  #include <Availability.h>
  #include <CommonCrypto/CommonCryptoError.h>

"
if test "x$ac_cv_header_CommonCrypto_CommonRandom_h" = xyes
then :
  printf "%s\n" "#define HAVE_COMMONCRYPTO_COMMONRANDOM_H 1" >>confdefs.h

fi


ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
if test "x$ac_cv_func_getrandom" = xyes
then :
  printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h

fi



  ext_builddir=ext/random
  ext_srcdir=$abs_srcdir/ext/random
  ext_dir=ext/random

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_RANDOM_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in csprng.c engine_mt19937.c engine_pcgoneseq128xslrr64.c engine_secure.c engine_user.c engine_xoshiro256starstar.c gammasection.c random.c randomizer.c zend_utils.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC random;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC random;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_RANDOM_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in csprng.c engine_mt19937.c engine_pcgoneseq128xslrr64.c engine_secure.c engine_user.c engine_xoshiro256starstar.c gammasection.c random.c randomizer.c zend_utils.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_random="$shared_objects_random $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/random.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/random.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_random"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/random.$suffix: $ext_builddir/random.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/random.$suffix \$(phplibdir)

$ext_builddir/random.$suffix: \$(shared_objects_random) \$(RANDOM_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_random) \$(RANDOM_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_RANDOM 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_RANDOM_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in csprng.c engine_mt19937.c engine_pcgoneseq128xslrr64.c engine_secure.c engine_user.c engine_xoshiro256starstar.c gammasection.c random.c randomizer.c zend_utils.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC random;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in csprng.c engine_mt19937.c engine_pcgoneseq128xslrr64.c engine_secure.c engine_user.c engine_xoshiro256starstar.c gammasection.c random.c randomizer.c zend_utils.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC random;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=random

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/random
    for header_file in php_random_csprng.h php_random_uint128.h php_random.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done







php_with_libedit=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libedit readline replacement" >&5
printf %s "checking for libedit readline replacement... " >&6; }

# Check whether --with-libedit was given.
if test ${with_libedit+y}
then :
  withval=$with_libedit; PHP_LIBEDIT=$withval
else case e in #(
  e)
  PHP_LIBEDIT=no
  test "$PHP_ENABLE_ALL" && PHP_LIBEDIT=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_LIBEDIT in
shared,*)
  PHP_LIBEDIT=$(echo "$PHP_LIBEDIT"|$SED 's/^shared,//')
  ;;
shared)
  PHP_LIBEDIT=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_LIBEDIT" = "no"; then

php_with_readline=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline support" >&5
printf %s "checking for readline support... " >&6; }

# Check whether --with-readline was given.
if test ${with_readline+y}
then :
  withval=$with_readline; PHP_READLINE=$withval
else case e in #(
  e)
  PHP_READLINE=no
  test "$PHP_ENABLE_ALL" && PHP_READLINE=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_READLINE in
shared,*)
  PHP_READLINE=$(echo "$PHP_READLINE"|$SED 's/^shared,//')
  ;;
shared)
  PHP_READLINE=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }



else
      php_with_readline=no
fi

if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
  for i in $PHP_READLINE /usr/local /usr; do
    if test -f $i/include/readline/readline.h
then :
  READLINE_DIR=$i; break;
fi
  done

  if ${READLINE_DIR:+false} :
then :
  as_fn_error $? "Please reinstall readline - I cannot find readline.h" "$LINENO" 5
fi


for include_path in $READLINE_DIR/include; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


  PHP_READLINE_LIBS=""
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
printf %s "checking for tgetent in -lncurses... " >&6; }
if test ${ac_cv_lib_ncurses_tgetent+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char tgetent (void);
int
main (void)
{
return tgetent ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_ncurses_tgetent=yes
else case e in #(
  e) ac_cv_lib_ncurses_tgetent=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; }
if test "x$ac_cv_lib_ncurses_tgetent" = xyes
then :



  case ncurses in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        READLINE_SHARED_LIBADD="-lncurses $READLINE_SHARED_LIBADD"
    else


  case ncurses in
  c|c_r) ;;
  *)
      LIBS="-lncurses $LIBS"
   ;;
  esac


    fi
   ;;
  esac


    PHP_READLINE_LIBS="$PHP_READLINE_LIBS -lncurses"

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
printf %s "checking for tgetent in -ltermcap... " >&6; }
if test ${ac_cv_lib_termcap_tgetent+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char tgetent (void);
int
main (void)
{
return tgetent ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_termcap_tgetent=yes
else case e in #(
  e) ac_cv_lib_termcap_tgetent=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; }
if test "x$ac_cv_lib_termcap_tgetent" = xyes
then :



  case termcap in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        READLINE_SHARED_LIBADD="-ltermcap $READLINE_SHARED_LIBADD"
    else


  case termcap in
  c|c_r) ;;
  *)
      LIBS="-ltermcap $LIBS"
   ;;
  esac


    fi
   ;;
  esac


      PHP_READLINE_LIBS="$PHP_READLINE_LIBS -ltermcap"

fi

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
printf %s "checking for readline in -lreadline... " >&6; }
if test ${ac_cv_lib_readline_readline+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char readline (void);
int
main (void)
{
return readline ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_readline_readline=yes
else case e in #(
  e) ac_cv_lib_readline_readline=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
printf "%s\n" "$ac_cv_lib_readline_readline" >&6; }
if test "x$ac_cv_lib_readline_readline" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


  if test "$ext_shared" = "yes"; then
    READLINE_SHARED_LIBADD="-lreadline $READLINE_SHARED_LIBADD"
    if test -n "$READLINE_DIR/$PHP_LIBDIR"; then

  if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$READLINE_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$READLINE_DIR/$PHP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$READLINE_DIR/$PHP_LIBDIR"; then

  if test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$READLINE_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$READLINE_DIR/$PHP_LIBDIR" || echo "$READLINE_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$READLINE_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $READLINE_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$READLINE_DIR/$PHP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case readline in
  c|c_r) ;;
  *)
      LIBS="-lreadline $LIBS"
   ;;
  esac




  fi



else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_readline_readline
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The readline library not found.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_callback_read_char in -lreadline" >&5
printf %s "checking for rl_callback_read_char in -lreadline... " >&6; }
if test ${ac_cv_lib_readline_rl_callback_read_char+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char rl_callback_read_char (void);
int
main (void)
{
return rl_callback_read_char ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_readline_rl_callback_read_char=yes
else case e in #(
  e) ac_cv_lib_readline_rl_callback_read_char=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_read_char" >&5
printf "%s\n" "$ac_cv_lib_readline_rl_callback_read_char" >&6; }
if test "x$ac_cv_lib_readline_rl_callback_read_char" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    printf "%s\n" "#define HAVE_RL_CALLBACK_READ_CHAR 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_readline_rl_callback_read_char

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_on_new_line in -lreadline" >&5
printf %s "checking for rl_on_new_line in -lreadline... " >&6; }
if test ${ac_cv_lib_readline_rl_on_new_line+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char rl_on_new_line (void);
int
main (void)
{
return rl_on_new_line ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_readline_rl_on_new_line=yes
else case e in #(
  e) ac_cv_lib_readline_rl_on_new_line=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_on_new_line" >&5
printf "%s\n" "$ac_cv_lib_readline_rl_on_new_line" >&6; }
if test "x$ac_cv_lib_readline_rl_on_new_line" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    printf "%s\n" "#define HAVE_RL_ON_NEW_LINE 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_readline_rl_on_new_line

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
printf %s "checking for rl_completion_matches in -lreadline... " >&6; }
if test ${ac_cv_lib_readline_rl_completion_matches+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char rl_completion_matches (void);
int
main (void)
{
return rl_completion_matches ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_readline_rl_completion_matches=yes
else case e in #(
  e) ac_cv_lib_readline_rl_completion_matches=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
printf "%s\n" "$ac_cv_lib_readline_rl_completion_matches" >&6; }
if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    printf "%s\n" "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_readline_rl_completion_matches

   ;;
esac
fi


  CFLAGS_SAVE=$CFLAGS
  LDFLAGS_SAVE=$LDFLAGS
  LIBS_SAVE=$LIBS
  CFLAGS="$CFLAGS $INCLUDES"
  LDFLAGS="$LDFLAGS -L$READLINE_DIR/$PHP_LIBDIR"
  LIBS="$LIBS -lreadline"

      ac_fn_check_decl "$LINENO" "rl_pending_input" "ac_cv_have_decl_rl_pending_input" "
      #include <stdio.h>
      #include <readline/readline.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_rl_pending_input" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "
      Invalid readline installation detected. Try --with-libedit instead.

See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

  ac_fn_check_decl "$LINENO" "rl_erase_empty_line" "ac_cv_have_decl_rl_erase_empty_line" "
      #include <stdio.h>
      #include <readline/readline.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_rl_erase_empty_line" = xyes
then :
  printf "%s\n" "#define HAVE_ERASE_EMPTY_LINE 1" >>confdefs.h

fi
  CFLAGS=$CFLAGS_SAVE
  LDFLAGS=$LDFLAGS_SAVE
  LIBS=$LIBS_SAVE

  printf "%s\n" "#define HAVE_HISTORY_LIST 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h


elif test "$PHP_LIBEDIT" != "no"; then
  if test "x$PHP_LIBEDIT" = xyes
then :

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The libedit directory argument is not supported anymore, rely on pkg-config.
Replace '--with-libedit=$PHP_LIBEDIT' with '--with-libedit' and use
environment variables 'PKG_CONFIG_PATH', 'EDIT_LIBS', or 'EDIT_CFLAGS'." >&5
printf "%s\n" "$as_me: WARNING: The libedit directory argument is not supported anymore, rely on pkg-config.
Replace '--with-libedit=$PHP_LIBEDIT' with '--with-libedit' and use
environment variables 'PKG_CONFIG_PATH', 'EDIT_LIBS', or 'EDIT_CFLAGS'." >&2;} ;;
esac
fi


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libedit" >&5
printf %s "checking for libedit... " >&6; }

if test -n "$EDIT_CFLAGS"; then
    pkg_cv_EDIT_CFLAGS="$EDIT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libedit") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_EDIT_CFLAGS=`$PKG_CONFIG --cflags "libedit" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$EDIT_LIBS"; then
    pkg_cv_EDIT_LIBS="$EDIT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libedit") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_EDIT_LIBS=`$PKG_CONFIG --libs "libedit" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        EDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libedit" 2>&1`
        else
	        EDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libedit" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$EDIT_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libedit) were not met:

$EDIT_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables EDIT_CFLAGS
and EDIT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables EDIT_CFLAGS
and EDIT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	EDIT_CFLAGS=$pkg_cv_EDIT_CFLAGS
	EDIT_LIBS=$pkg_cv_EDIT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $EDIT_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  READLINE_SHARED_LIBADD="$READLINE_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        READLINE_SHARED_LIBADD="$READLINE_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        READLINE_SHARED_LIBADD="-L$ai_p $READLINE_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && READLINE_SHARED_LIBADD="$ld_runpath_switch$ai_p $READLINE_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $EDIT_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
printf %s "checking for tgetent in -lncurses... " >&6; }
if test ${ac_cv_lib_ncurses_tgetent+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char tgetent (void);
int
main (void)
{
return tgetent ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_ncurses_tgetent=yes
else case e in #(
  e) ac_cv_lib_ncurses_tgetent=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; }
if test "x$ac_cv_lib_ncurses_tgetent" = xyes
then :


  case ncurses in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        READLINE_SHARED_LIBADD="-lncurses $READLINE_SHARED_LIBADD"
    else


  case ncurses in
  c|c_r) ;;
  *)
      LIBS="-lncurses $LIBS"
   ;;
  esac


    fi
   ;;
  esac


else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
printf %s "checking for tgetent in -ltermcap... " >&6; }
if test ${ac_cv_lib_termcap_tgetent+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char tgetent (void);
int
main (void)
{
return tgetent ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_termcap_tgetent=yes
else case e in #(
  e) ac_cv_lib_termcap_tgetent=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; }
if test "x$ac_cv_lib_termcap_tgetent" = xyes
then :


  case termcap in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        READLINE_SHARED_LIBADD="-ltermcap $READLINE_SHARED_LIBADD"
    else


  case termcap in
  c|c_r) ;;
  *)
      LIBS="-ltermcap $LIBS"
   ;;
  esac


    fi
   ;;
  esac


fi
 ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$READLINE_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline in -ledit" >&5
printf %s "checking for readline in -ledit... " >&6; }
if test ${ac_cv_lib_edit_readline+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ledit  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char readline (void);
int
main (void)
{
return readline ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_edit_readline=yes
else case e in #(
  e) ac_cv_lib_edit_readline=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5
printf "%s\n" "$ac_cv_lib_edit_readline" >&6; }
if test "x$ac_cv_lib_edit_readline" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_edit_readline
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The edit library required by readline extension not found.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$READLINE_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_callback_read_char in -ledit" >&5
printf %s "checking for rl_callback_read_char in -ledit... " >&6; }
if test ${ac_cv_lib_edit_rl_callback_read_char+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ledit  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char rl_callback_read_char (void);
int
main (void)
{
return rl_callback_read_char ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_edit_rl_callback_read_char=yes
else case e in #(
  e) ac_cv_lib_edit_rl_callback_read_char=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_rl_callback_read_char" >&5
printf "%s\n" "$ac_cv_lib_edit_rl_callback_read_char" >&6; }
if test "x$ac_cv_lib_edit_rl_callback_read_char" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_RL_CALLBACK_READ_CHAR 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_edit_rl_callback_read_char

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$READLINE_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_on_new_line in -ledit" >&5
printf %s "checking for rl_on_new_line in -ledit... " >&6; }
if test ${ac_cv_lib_edit_rl_on_new_line+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ledit  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char rl_on_new_line (void);
int
main (void)
{
return rl_on_new_line ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_edit_rl_on_new_line=yes
else case e in #(
  e) ac_cv_lib_edit_rl_on_new_line=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_rl_on_new_line" >&5
printf "%s\n" "$ac_cv_lib_edit_rl_on_new_line" >&6; }
if test "x$ac_cv_lib_edit_rl_on_new_line" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_RL_ON_NEW_LINE 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_edit_rl_on_new_line

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$READLINE_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -ledit" >&5
printf %s "checking for rl_completion_matches in -ledit... " >&6; }
if test ${ac_cv_lib_edit_rl_completion_matches+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ledit  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char rl_completion_matches (void);
int
main (void)
{
return rl_completion_matches ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_edit_rl_completion_matches=yes
else case e in #(
  e) ac_cv_lib_edit_rl_completion_matches=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_rl_completion_matches" >&5
printf "%s\n" "$ac_cv_lib_edit_rl_completion_matches" >&6; }
if test "x$ac_cv_lib_edit_rl_completion_matches" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_edit_rl_completion_matches

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$READLINE_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for history_list in -ledit" >&5
printf %s "checking for history_list in -ledit... " >&6; }
if test ${ac_cv_lib_edit_history_list+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ledit  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char history_list (void);
int
main (void)
{
return history_list ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_edit_history_list=yes
else case e in #(
  e) ac_cv_lib_edit_history_list=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_history_list" >&5
printf "%s\n" "$ac_cv_lib_edit_history_list" >&6; }
if test "x$ac_cv_lib_edit_history_list" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_HISTORY_LIST 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_edit_history_list

   ;;
esac
fi


  CFLAGS_SAVE=$CFLAGS
  LIBS_SAVE=$LIBS
  CFLAGS="$CFLAGS $EDIT_CFLAGS"
  LIBS="$LIBS $EDIT_LIBS"
  ac_fn_check_decl "$LINENO" "rl_erase_empty_line" "ac_cv_have_decl_rl_erase_empty_line" "#include <editline/readline.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_rl_erase_empty_line" = xyes
then :

printf "%s\n" "#define HAVE_ERASE_EMPTY_LINE 1" >>confdefs.h

fi
  CFLAGS=$CFLAGS_SAVE
  LIBS=$LIBS_SAVE


printf "%s\n" "#define HAVE_LIBEDIT 1" >>confdefs.h

fi

if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then

  ext_builddir=ext/readline
  ext_srcdir=$abs_srcdir/ext/readline
  ext_dir=ext/readline

  ac_extra=$(echo "-Wno-strict-prototypes"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" != "cli"; then
    PHP_READLINE_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in readline.c readline_cli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC readline;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC readline;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_READLINE_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in readline.c readline_cli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_readline="$shared_objects_readline $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/readline.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/readline.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_readline"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/readline.$suffix: $ext_builddir/readline.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/readline.$suffix \$(phplibdir)

$ext_builddir/readline.$suffix: \$(shared_objects_readline) \$(READLINE_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_readline) \$(READLINE_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_READLINE 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "cli" = "cli"; then
    PHP_READLINE_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in readline.c readline_cli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC readline;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in readline.c readline_cli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC readline;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=readline

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST READLINE_SHARED_LIBADD"

fi





  ext_builddir=ext/reflection
  ext_srcdir=$abs_srcdir/ext/reflection
  ext_dir=ext/reflection

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_REFLECTION_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_reflection.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC reflection;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC reflection;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_REFLECTION_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_reflection.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_reflection="$shared_objects_reflection $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/reflection.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/reflection.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_reflection"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/reflection.$suffix: $ext_builddir/reflection.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/reflection.$suffix \$(phplibdir)

$ext_builddir/reflection.$suffix: \$(shared_objects_reflection) \$(REFLECTION_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_reflection) \$(REFLECTION_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_REFLECTION 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_REFLECTION_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_reflection.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC reflection;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_reflection.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC reflection;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=reflection

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi






php_enable_session=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable PHP sessions" >&5
printf %s "checking whether to enable PHP sessions... " >&6; }
# Check whether --enable-session was given.
if test ${enable_session+y}
then :
  enableval=$enable_session; PHP_SESSION=$enableval
else case e in #(
  e)
  PHP_SESSION=yes
  test "$PHP_ENABLE_ALL" && PHP_SESSION=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SESSION in
shared,*)
  PHP_SESSION=$(echo "$PHP_SESSION"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SESSION=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_mm=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mm support" >&5
printf %s "checking for mm support... " >&6; }

# Check whether --with-mm was given.
if test ${with_mm+y}
then :
  withval=$with_mm; PHP_MM=$withval
else case e in #(
  e)
  PHP_MM=no

 ;;
esac
fi


ext_output=$PHP_MM
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SESSION" != "no"; then

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pwrite works" >&5
printf %s "checking whether pwrite works... " >&6; }
if test ${php_cv_func_pwrite+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)

if test "$cross_compiling" = yes
then :
  php_cv_func_pwrite=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>

    int main(void) {
    int fd = open("conftest_pwrite", O_WRONLY|O_CREAT, 0600);

    if (fd < 0) return 1;
    if (pwrite(fd, "text", 4, 0) != 4) return 1;
    /* Linux glibc breakage until 2.2.5 */
    if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) return 1;
    return 0;
    }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_pwrite=yes
else case e in #(
  e) php_cv_func_pwrite=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi


  if test "x$php_cv_func_pwrite" = xno
then :


if test "$cross_compiling" = yes
then :
  php_cv_func_pwrite=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
ssize_t pwrite(int, void *, size_t, off64_t);
    int main(void) {
    int fd = open("conftest_pwrite", O_WRONLY|O_CREAT, 0600);

    if (fd < 0) return 1;
    if (pwrite(fd, "text", 4, 0) != 4) return 1;
    /* Linux glibc breakage until 2.2.5 */
    if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) return 1;
    return 0;
    }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_pwrite=yes
else case e in #(
  e) php_cv_func_pwrite=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi


    if test "x$php_cv_func_pwrite" = xyes
then :
  php_cv_func_pwrite=64
fi

fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_pwrite" >&5
printf "%s\n" "$php_cv_func_pwrite" >&6; }

if test "x$php_cv_func_pwrite" = xno
then :

else case e in #(
  e)

printf "%s\n" "#define HAVE_PWRITE 1" >>confdefs.h

  if test "x$php_cv_func_pwrite" = x64
then :

printf "%s\n" "#define PHP_PWRITE_64 1" >>confdefs.h

fi
 ;;
esac
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pread works" >&5
printf %s "checking whether pread works... " >&6; }
if test ${php_cv_func_pread+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)

echo test > conftest_pread
if test "$cross_compiling" = yes
then :
  php_cv_func_pread=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>

    int main(void) {
    char buf[3];
    int fd = open("conftest_pread", O_RDONLY);
    if (fd < 0) return 1;
    if (pread(fd, buf, 2, 0) != 2) return 1;
    /* Linux glibc breakage until 2.2.5 */
    if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) return 1;
    return 0;
    }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_pread=yes
else case e in #(
  e) php_cv_func_pread=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi


  if test "x$php_cv_func_pread" = xno
then :


echo test > conftest_pread
if test "$cross_compiling" = yes
then :
  php_cv_func_pread=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
ssize_t pread(int, void *, size_t, off64_t);
    int main(void) {
    char buf[3];
    int fd = open("conftest_pread", O_RDONLY);
    if (fd < 0) return 1;
    if (pread(fd, buf, 2, 0) != 2) return 1;
    /* Linux glibc breakage until 2.2.5 */
    if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) return 1;
    return 0;
    }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_func_pread=yes
else case e in #(
  e) php_cv_func_pread=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi


    if test "x$php_cv_func_pread" = xyes
then :
  php_cv_func_pread=64
fi

fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_pread" >&5
printf "%s\n" "$php_cv_func_pread" >&6; }

if test "x$php_cv_func_pread" = xno
then :

else case e in #(
  e)

printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h

  if test "x$php_cv_func_pread" = x64
then :

printf "%s\n" "#define PHP_PREAD_64 1" >>confdefs.h

fi
 ;;
esac
fi


  ext_builddir=ext/session
  ext_srcdir=$abs_srcdir/ext/session
  ext_dir=ext/session

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SESSION_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC session;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC session;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SESSION_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_session="$shared_objects_session $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/session.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/session.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_session"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/session.$suffix: $ext_builddir/session.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/session.$suffix \$(phplibdir)

$ext_builddir/session.$suffix: \$(shared_objects_session) \$(SESSION_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_session) \$(SESSION_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SESSION 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SESSION_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC session;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC session;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=session

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi



  am_i_shared=$PHP_SESSION_SHARED
  is_it_shared=$PHP_DATE_SHARED
  is_it_enabled=$PHP_DATE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension session to build statically, but it
depends on extension date, which you've configured to build shared.
You either need to build session shared or build date statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension session, which depends on extension date,
but you've either not enabled date, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_SESSION_SHARED
  is_it_shared=$PHP_SPL_SHARED
  is_it_enabled=$PHP_SPL
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension session to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build session shared or build spl statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
    as_fn_error $? "
You've configured extension session, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
  fi



  PHP_VAR_SUBST="$PHP_VAR_SUBST SESSION_SHARED_LIBADD"


    header_path=ext/session
    for header_file in php_session.h mod_files.h mod_user.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



printf "%s\n" "#define HAVE_PHP_SESSION 1" >>confdefs.h


  if test "x$PHP_MM" = xno
then :

else case e in #(
  e)
    for i in $PHP_MM /usr/local /usr; do
      if test -f "$i/include/mm.h"
then :
  MM_DIR=$i; break;
fi
    done

    if ${MM_DIR:+false} :
then :
  as_fn_error $? "Cannot find the 'mm' library, <mm.h> header file not found." "$LINENO" 5
fi

    if test "x$PHP_THREAD_SAFETY" = xyes
then :
  as_fn_error $? "The configure option '--with-mm' cannot be combined with '--enable-zts'. The
mm library is not thread-safe, and mod_mm.c refuses to compile. Either remove
the '--with-mm' option, or build without thread safety (remove the
'--enable-zts' option)." "$LINENO" 5
fi



  if test "$ext_shared" = "yes"; then
    SESSION_SHARED_LIBADD="-lmm $SESSION_SHARED_LIBADD"
    if test -n "$MM_DIR/$PHP_LIBDIR"; then

  if test "$MM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MM_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$MM_DIR/$PHP_LIBDIR" || echo "$MM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$MM_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $MM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$MM_DIR/$PHP_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        SESSION_SHARED_LIBADD="-L$ai_p $SESSION_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && SESSION_SHARED_LIBADD="$ld_runpath_switch$ai_p $SESSION_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$MM_DIR/$PHP_LIBDIR"; then

  if test "$MM_DIR/$PHP_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$MM_DIR/$PHP_LIBDIR" != "/usr/lib"; then

  if test -z "$MM_DIR/$PHP_LIBDIR" || echo "$MM_DIR/$PHP_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$MM_DIR/$PHP_LIBDIR
  else

    ep_dir=$(echo $MM_DIR/$PHP_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$MM_DIR/$PHP_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case mm in
  c|c_r) ;;
  *)
      LIBS="-lmm $LIBS"
   ;;
  esac




  fi



for include_path in $MM_DIR/include; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


    header_path=ext/session
    for header_file in mod_mm.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



printf "%s\n" "#define HAVE_LIBMM 1" >>confdefs.h

   ;;
esac
fi
fi





php_enable_shmop=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable shmop support" >&5
printf %s "checking whether to enable shmop support... " >&6; }
# Check whether --enable-shmop was given.
if test ${enable_shmop+y}
then :
  enableval=$enable_shmop; PHP_SHMOP=$enableval
else case e in #(
  e)
  PHP_SHMOP=no
  test "$PHP_ENABLE_ALL" && PHP_SHMOP=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SHMOP in
shared,*)
  PHP_SHMOP=$(echo "$PHP_SHMOP"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SHMOP=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SHMOP" != "no"; then

printf "%s\n" "#define HAVE_SHMOP 1" >>confdefs.h


  ext_builddir=ext/shmop
  ext_srcdir=$abs_srcdir/ext/shmop
  ext_dir=ext/shmop

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SHMOP_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in shmop.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC shmop;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC shmop;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SHMOP_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in shmop.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_shmop="$shared_objects_shmop $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/shmop.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/shmop.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_shmop"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/shmop.$suffix: $ext_builddir/shmop.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/shmop.$suffix \$(phplibdir)

$ext_builddir/shmop.$suffix: \$(shared_objects_shmop) \$(SHMOP_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_shmop) \$(SHMOP_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SHMOP 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SHMOP_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in shmop.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC shmop;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in shmop.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC shmop;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=shmop

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

fi





php_enable_simplexml=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable SimpleXML support" >&5
printf %s "checking whether to enable SimpleXML support... " >&6; }
# Check whether --enable-simplexml was given.
if test ${enable_simplexml+y}
then :
  enableval=$enable_simplexml; PHP_SIMPLEXML=$enableval
else case e in #(
  e)
  PHP_SIMPLEXML=yes
  test "$PHP_ENABLE_ALL" && PHP_SIMPLEXML=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SIMPLEXML in
shared,*)
  PHP_SIMPLEXML=$(echo "$PHP_SIMPLEXML"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SIMPLEXML=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SIMPLEXML" != "no"; then


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.9.4" >&5
printf %s "checking for libxml-2.0 >= 2.9.4... " >&6; }

if test -n "$LIBXML_CFLAGS"; then
    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBXML_LIBS"; then
    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        else
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBXML_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libxml-2.0 >= 2.9.4) were not met:

$LIBXML_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $LIBXML_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBXML_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  SIMPLEXML_SHARED_LIBADD="$SIMPLEXML_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        SIMPLEXML_SHARED_LIBADD="$SIMPLEXML_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        SIMPLEXML_SHARED_LIBADD="-L$ai_p $SIMPLEXML_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && SIMPLEXML_SHARED_LIBADD="$ld_runpath_switch$ai_p $SIMPLEXML_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_SIMPLEXML 1" >>confdefs.h


  ext_builddir=ext/simplexml
  ext_srcdir=$abs_srcdir/ext/simplexml
  ext_dir=ext/simplexml

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SIMPLEXML_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in simplexml.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC simplexml;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC simplexml;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SIMPLEXML_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in simplexml.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_simplexml="$shared_objects_simplexml $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/simplexml.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/simplexml.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_simplexml"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/simplexml.$suffix: $ext_builddir/simplexml.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/simplexml.$suffix \$(phplibdir)

$ext_builddir/simplexml.$suffix: \$(shared_objects_simplexml) \$(SIMPLEXML_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_simplexml) \$(SIMPLEXML_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SIMPLEXML 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SIMPLEXML_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in simplexml.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC simplexml;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in simplexml.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC simplexml;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=simplexml

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_SIMPLEXML_SHARED
  is_it_shared=$PHP_LIBXML_SHARED
  is_it_enabled=$PHP_LIBXML
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension simplexml to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build simplexml shared or build libxml statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension simplexml, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_SIMPLEXML_SHARED
  is_it_shared=$PHP_SPL_SHARED
  is_it_enabled=$PHP_SPL
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension simplexml to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build simplexml shared or build spl statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension simplexml, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
  fi


    header_path=ext/simplexml
    for header_file in php_simplexml_exports.h php_simplexml.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



  PHP_VAR_SUBST="$PHP_VAR_SUBST SIMPLEXML_SHARED_LIBADD"



fi





php_with_snmp=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SNMP support" >&5
printf %s "checking for SNMP support... " >&6; }

# Check whether --with-snmp was given.
if test ${with_snmp+y}
then :
  withval=$with_snmp; PHP_SNMP=$withval
else case e in #(
  e)
  PHP_SNMP=no
  test "$PHP_ENABLE_ALL" && PHP_SNMP=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SNMP in
shared,*)
  PHP_SNMP=$(echo "$PHP_SNMP"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SNMP=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SNMP" != "no"; then
  snmp_found=no
  if test "x$PHP_SNMP" = xyes
then :

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for netsnmp >= 5.3" >&5
printf %s "checking for netsnmp >= 5.3... " >&6; }

if test -n "$SNMP_CFLAGS"; then
    pkg_cv_SNMP_CFLAGS="$SNMP_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"netsnmp >= 5.3\""; } >&5
  ($PKG_CONFIG --exists --print-errors "netsnmp >= 5.3") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SNMP_CFLAGS=`$PKG_CONFIG --cflags "netsnmp >= 5.3" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$SNMP_LIBS"; then
    pkg_cv_SNMP_LIBS="$SNMP_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"netsnmp >= 5.3\""; } >&5
  ($PKG_CONFIG --exists --print-errors "netsnmp >= 5.3") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_SNMP_LIBS=`$PKG_CONFIG --libs "netsnmp >= 5.3" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        SNMP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "netsnmp >= 5.3" 2>&1`
        else
	        SNMP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "netsnmp >= 5.3" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$SNMP_PKG_ERRORS" >&5

	:
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	:
else
	SNMP_CFLAGS=$pkg_cv_SNMP_CFLAGS
	SNMP_LIBS=$pkg_cv_SNMP_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	snmp_found=yes
fi
fi

  if test "x$snmp_found" = xno
then :

    if test "x$PHP_SNMP" = xyes
then :
  # Extract the first word of "net-snmp-config", so it can be a program name with args.
set dummy net-snmp-config; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_SNMP_CONFIG+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $SNMP_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="/usr/local/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_SNMP_CONFIG="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac ;;
esac
fi
SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG
if test -n "$SNMP_CONFIG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SNMP_CONFIG" >&5
printf "%s\n" "$SNMP_CONFIG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


else case e in #(
  e) SNMP_CONFIG="$PHP_SNMP/bin/net-snmp-config" ;;
esac
fi

    if test ! -x "$SNMP_CONFIG"
then :
  as_fn_error $? "Could not find net-snmp-config binary. Please check your net-snmp
installation." "$LINENO" 5
fi

    snmp_version=$($SNMP_CONFIG --version)
    as_arg_v1=$snmp_version
as_arg_v2=5.3
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
case $? in #(
  1) :
    as_fn_error $? "Net-SNMP version 5.3 or greater required (detected $snmp_version)." "$LINENO" 5 ;; #(
  0) :
     ;; #(
  2) :
     ;; #(
  *) :
     ;;
esac

    SNMP_PREFIX=$($SNMP_CONFIG --prefix)
    SNMP_CFLAGS="-I${SNMP_PREFIX}/include"
    SNMP_LIBS=$($SNMP_CONFIG --netsnmp-libs)
    SNMP_LIBS="$SNMP_LIBS $($SNMP_CONFIG --external-libs)"

    if test -z "$SNMP_LIBS" || test -z "$SNMP_PREFIX"
then :
  as_fn_error $? "Could not find the required paths. Please check your net-snmp installation." "$LINENO" 5
fi

fi


  for ac_i in $SNMP_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $SNMP_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        SNMP_SHARED_LIBADD="$SNMP_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        SNMP_SHARED_LIBADD="-L$ai_p $SNMP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && SNMP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SNMP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  SNMP_LIBNAME=netsnmp


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$SNMP_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$SNMP_LIBNAME""_init_snmp" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for init_snmp in -l$SNMP_LIBNAME" >&5
printf %s "checking for init_snmp in -l$SNMP_LIBNAME... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$SNMP_LIBNAME  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char init_snmp (void);
int
main (void)
{
return init_snmp ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_SNMP 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$SNMP_LIBNAME_init_snmp
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "SNMP sanity check failed.
See 'config.log' for more details" "$LINENO" 5; }
   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$SNMP_SHARED_LIBADD"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$SNMP_LIBNAME""_shutdown_snmp_logging" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shutdown_snmp_logging in -l$SNMP_LIBNAME" >&5
printf %s "checking for shutdown_snmp_logging in -l$SNMP_LIBNAME... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$SNMP_LIBNAME  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char shutdown_snmp_logging (void);
int
main (void)
{
return shutdown_snmp_logging ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_SHUTDOWN_SNMP_LOGGING 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$SNMP_LIBNAME_shutdown_snmp_logging

   ;;
esac
fi


  CFLAGS_SAVE=$CFLAGS
  LIBS_SAVE=$LIBS
  CFLAGS="$CFLAGS $SNMP_CFLAGS"
  LIBS="$LIBS $SNMP_LIBS"

  ac_fn_check_decl "$LINENO" "usmHMAC192SHA256AuthProtocol" "ac_cv_have_decl_usmHMAC192SHA256AuthProtocol" "
      #include <net-snmp/net-snmp-config.h>
      #include <net-snmp/net-snmp-includes.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_usmHMAC192SHA256AuthProtocol" = xyes
then :

printf "%s\n" "#define HAVE_SNMP_SHA256 1" >>confdefs.h

fi

  ac_fn_check_decl "$LINENO" "usmHMAC384SHA512AuthProtocol" "ac_cv_have_decl_usmHMAC384SHA512AuthProtocol" "
      #include <net-snmp/net-snmp-config.h>
      #include <net-snmp/net-snmp-includes.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_usmHMAC384SHA512AuthProtocol" = xyes
then :

printf "%s\n" "#define HAVE_SNMP_SHA512 1" >>confdefs.h

fi

  CFLAGS=$CFLAGS_SAVE
  LIBS=$LIBS_SAVE


  ext_builddir=ext/snmp
  ext_srcdir=$abs_srcdir/ext/snmp
  ext_dir=ext/snmp

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SNMP_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in snmp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC snmp;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC snmp;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SNMP_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in snmp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_snmp="$shared_objects_snmp $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/snmp.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/snmp.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_snmp"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/snmp.$suffix: $ext_builddir/snmp.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/snmp.$suffix \$(phplibdir)

$ext_builddir/snmp.$suffix: \$(shared_objects_snmp) \$(SNMP_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_snmp) \$(SNMP_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SNMP 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SNMP_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in snmp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC snmp;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in snmp.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC snmp;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=snmp

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_SNMP_SHARED
  is_it_shared=$PHP_SPL_SHARED
  is_it_enabled=$PHP_SPL
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension snmp to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build snmp shared or build spl statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension snmp, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST SNMP_SHARED_LIBADD"

fi





php_enable_soap=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable SOAP support" >&5
printf %s "checking whether to enable SOAP support... " >&6; }
# Check whether --enable-soap was given.
if test ${enable_soap+y}
then :
  enableval=$enable_soap; PHP_SOAP=$enableval
else case e in #(
  e)
  PHP_SOAP=no
  test "$PHP_ENABLE_ALL" && PHP_SOAP=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SOAP in
shared,*)
  PHP_SOAP=$(echo "$PHP_SOAP"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SOAP=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SOAP" != "no"; then


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.9.4" >&5
printf %s "checking for libxml-2.0 >= 2.9.4... " >&6; }

if test -n "$LIBXML_CFLAGS"; then
    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBXML_LIBS"; then
    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        else
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBXML_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libxml-2.0 >= 2.9.4) were not met:

$LIBXML_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $LIBXML_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBXML_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  SOAP_SHARED_LIBADD="$SOAP_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        SOAP_SHARED_LIBADD="$SOAP_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        SOAP_SHARED_LIBADD="-L$ai_p $SOAP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && SOAP_SHARED_LIBADD="$ld_runpath_switch$ai_p $SOAP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_SOAP 1" >>confdefs.h


  ext_builddir=ext/soap
  ext_srcdir=$abs_srcdir/ext/soap
  ext_dir=ext/soap

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SOAP_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c soap.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC soap;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC soap;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SOAP_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c soap.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_soap="$shared_objects_soap $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/soap.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/soap.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_soap"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/soap.$suffix: $ext_builddir/soap.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/soap.$suffix \$(phplibdir)

$ext_builddir/soap.$suffix: \$(shared_objects_soap) \$(SOAP_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_soap) \$(SOAP_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SOAP 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SOAP_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c soap.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC soap;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c soap.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC soap;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=soap

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST SOAP_SHARED_LIBADD"




  am_i_shared=$PHP_SOAP_SHARED
  is_it_shared=$PHP_DATE_SHARED
  is_it_enabled=$PHP_DATE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension soap to build statically, but it
depends on extension date, which you've configured to build shared.
You either need to build soap shared or build date statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension soap, which depends on extension date,
but you've either not enabled date, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_SOAP_SHARED
  is_it_shared=$PHP_HASH_SHARED
  is_it_enabled=$PHP_HASH
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension soap to build statically, but it
depends on extension hash, which you've configured to build shared.
You either need to build soap shared or build hash statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension soap, which depends on extension hash,
but you've either not enabled hash, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_SOAP_SHARED
  is_it_shared=$PHP_LIBXML_SHARED
  is_it_enabled=$PHP_LIBXML
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension soap to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build soap shared or build libxml statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension soap, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_SOAP_SHARED
  is_it_shared=$PHP_SESSION_SHARED
  is_it_enabled=$PHP_SESSION
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension soap to build statically, but it
depends on extension session, which you've configured to build shared.
You either need to build soap shared or build session statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
    as_fn_error $? "
You've configured extension soap, which depends on extension session,
but you've either not enabled session, or have disabled it.
" "$LINENO" 5
  fi

fi





php_enable_sockets=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable sockets support" >&5
printf %s "checking whether to enable sockets support... " >&6; }
# Check whether --enable-sockets was given.
if test ${enable_sockets+y}
then :
  enableval=$enable_sockets; PHP_SOCKETS=$enableval
else case e in #(
  e)
  PHP_SOCKETS=no
  test "$PHP_ENABLE_ALL" && PHP_SOCKETS=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SOCKETS in
shared,*)
  PHP_SOCKETS=$(echo "$PHP_SOCKETS"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SOCKETS=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SOCKETS" != "no"; then
  ac_fn_c_check_func "$LINENO" "hstrerror" "ac_cv_func_hstrerror"
if test "x$ac_cv_func_hstrerror" = xyes
then :
  printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
if test "x$ac_cv_func_if_nametoindex" = xyes
then :
  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "if_indextoname" "ac_cv_func_if_indextoname"
if test "x$ac_cv_func_if_indextoname" = xyes
then :
  printf "%s\n" "#define HAVE_IF_INDEXTONAME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sockatmark" "ac_cv_func_sockatmark"
if test "x$ac_cv_func_sockatmark" = xyes
then :
  printf "%s\n" "#define HAVE_SOCKATMARK 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
if test "x$ac_cv_func_accept4" = xyes
then :
  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h

fi

  ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_sockio_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "linux/filter.h" "ac_cv_header_linux_filter_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_filter_h" = xyes
then :
  printf "%s\n" "#define HAVE_LINUX_FILTER_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "linux/if_packet.h" "ac_cv_header_linux_if_packet_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_if_packet_h" = xyes
then :
  printf "%s\n" "#define HAVE_LINUX_IF_PACKET_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "linux/if_ether.h" "ac_cv_header_linux_if_ether_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_if_ether_h" = xyes
then :
  printf "%s\n" "#define HAVE_LINUX_IF_ETHER_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "linux/udp.h" "ac_cv_header_linux_udp_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_udp_h" = xyes
then :
  printf "%s\n" "#define HAVE_LINUX_UDP_H 1" >>confdefs.h

fi


printf "%s\n" "#define HAVE_SOCKETS 1" >>confdefs.h


    ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/socket.h>
"
if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h


fi


    ac_fn_c_check_type "$LINENO" "struct ucred" "ac_cv_type_struct_ucred" "
    #ifndef _GNU_SOURCE
    # define _GNU_SOURCE
    #endif
    #include <sys/socket.h>

"
if test "x$ac_cv_type_struct_ucred" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UCRED 1" >>confdefs.h


fi


  ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
"
if test "x$ac_cv_type_struct_cmsgcred" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_CMSGCRED 1" >>confdefs.h


fi


  PHP_SOCKETS_CFLAGS=-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1
  case $host_alias in #(
  *darwin*) :
    PHP_SOCKETS_CFLAGS="$PHP_SOCKETS_CFLAGS -D__APPLE_USE_RFC_3542" ;; #(
  *) :
     ;;
esac


  ext_builddir=ext/sockets
  ext_srcdir=$abs_srcdir/ext/sockets
  ext_dir=ext/sockets

  ac_extra=$(echo "$PHP_SOCKETS_CFLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SOCKETS_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC sockets;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC sockets;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SOCKETS_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_sockets="$shared_objects_sockets $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sockets.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sockets.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sockets"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/sockets.$suffix: $ext_builddir/sockets.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/sockets.$suffix \$(phplibdir)

$ext_builddir/sockets.$suffix: \$(shared_objects_sockets) \$(SOCKETS_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_sockets) \$(SOCKETS_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SOCKETS 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SOCKETS_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC sockets;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC sockets;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=sockets

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/sockets
    for header_file in php_sockets.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done


fi





php_with_sodium=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sodium support" >&5
printf %s "checking for sodium support... " >&6; }

# Check whether --with-sodium was given.
if test ${with_sodium+y}
then :
  withval=$with_sodium; PHP_SODIUM=$withval
else case e in #(
  e)
  PHP_SODIUM=no
  test "$PHP_ENABLE_ALL" && PHP_SODIUM=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SODIUM in
shared,*)
  PHP_SODIUM=$(echo "$PHP_SODIUM"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SODIUM=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SODIUM" != "no"; then

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium >= 1.0.8" >&5
printf %s "checking for libsodium >= 1.0.8... " >&6; }

if test -n "$LIBSODIUM_CFLAGS"; then
    pkg_cv_LIBSODIUM_CFLAGS="$LIBSODIUM_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsodium >= 1.0.8\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libsodium >= 1.0.8") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBSODIUM_CFLAGS=`$PKG_CONFIG --cflags "libsodium >= 1.0.8" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBSODIUM_LIBS"; then
    pkg_cv_LIBSODIUM_LIBS="$LIBSODIUM_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsodium >= 1.0.8\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libsodium >= 1.0.8") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBSODIUM_LIBS=`$PKG_CONFIG --libs "libsodium >= 1.0.8" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBSODIUM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsodium >= 1.0.8" 2>&1`
        else
	        LIBSODIUM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsodium >= 1.0.8" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBSODIUM_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libsodium >= 1.0.8) were not met:

$LIBSODIUM_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSODIUM_CFLAGS
and LIBSODIUM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBSODIUM_CFLAGS
and LIBSODIUM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBSODIUM_CFLAGS=$pkg_cv_LIBSODIUM_CFLAGS
	LIBSODIUM_LIBS=$pkg_cv_LIBSODIUM_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


  for ac_i in $LIBSODIUM_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBSODIUM_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  SODIUM_SHARED_LIBADD="$SODIUM_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        SODIUM_SHARED_LIBADD="$SODIUM_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        SODIUM_SHARED_LIBADD="-L$ai_p $SODIUM_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && SODIUM_SHARED_LIBADD="$ld_runpath_switch$ai_p $SODIUM_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_LIBSODIUMLIB 1" >>confdefs.h


  SODIUM_COMPILER_FLAGS=$LIBSODIUM_CFLAGS

    # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
printf %s "checking size of long... " >&6; }
if test ${ac_cv_sizeof_long+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
then :

else case e in #(
  e) if test "$ac_cv_type_long" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See 'config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long=0
   fi ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
printf "%s\n" "$ac_cv_sizeof_long" >&6; }



printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h


  if test "$ac_cv_sizeof_long" -eq 4
then :

    SODIUM_COMPILER_FLAGS="$SODIUM_COMPILER_FLAGS -Wno-type-limits"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wno-logical-op" >&5
printf %s "checking whether the C compiler accepts -Wno-logical-op... " >&6; }
if test ${ax_cv_check_cflags___Wno_logical_op+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wno-logical-op $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wno_logical_op=yes
else case e in #(
  e) ax_cv_check_cflags___Wno_logical_op=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_logical_op" >&5
printf "%s\n" "$ax_cv_check_cflags___Wno_logical_op" >&6; }
if test "x$ax_cv_check_cflags___Wno_logical_op" = xyes
then :
  SODIUM_COMPILER_FLAGS="$SODIUM_COMPILER_FLAGS -Wno-logical-op"
else case e in #(
  e) : ;;
esac
fi


fi


  ext_builddir=ext/sodium
  ext_srcdir=$abs_srcdir/ext/sodium
  ext_dir=ext/sodium

  ac_extra=$(echo "$SODIUM_COMPILER_FLAGS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SODIUM_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in libsodium.c sodium_pwhash.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC sodium;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC sodium;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SODIUM_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in libsodium.c sodium_pwhash.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_sodium="$shared_objects_sodium $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sodium.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sodium.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sodium"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/sodium.$suffix: $ext_builddir/sodium.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/sodium.$suffix \$(phplibdir)

$ext_builddir/sodium.$suffix: \$(shared_objects_sodium) \$(SODIUM_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_sodium) \$(SODIUM_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SODIUM 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SODIUM_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in libsodium.c sodium_pwhash.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC sodium;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in libsodium.c sodium_pwhash.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC sodium;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=sodium

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/sodium
    for header_file in php_libsodium.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



  PHP_VAR_SUBST="$PHP_VAR_SUBST SODIUM_SHARED_LIBADD"

fi





  ext_builddir=ext/spl
  ext_srcdir=$abs_srcdir/ext/spl
  ext_dir=ext/spl

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_SPL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_spl.c spl_array.c spl_directory.c spl_dllist.c spl_exceptions.c spl_fixedarray.c spl_functions.c spl_heap.c spl_iterators.c spl_observer.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC spl;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC spl;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_SPL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_spl.c spl_array.c spl_directory.c spl_dllist.c spl_exceptions.c spl_fixedarray.c spl_functions.c spl_heap.c spl_iterators.c spl_observer.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_spl="$shared_objects_spl $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/spl.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/spl.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_spl"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/spl.$suffix: $ext_builddir/spl.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/spl.$suffix \$(phplibdir)

$ext_builddir/spl.$suffix: \$(shared_objects_spl) \$(SPL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_spl) \$(SPL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SPL 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_SPL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_spl.c spl_array.c spl_directory.c spl_dllist.c spl_exceptions.c spl_fixedarray.c spl_functions.c spl_heap.c spl_iterators.c spl_observer.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC spl;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_spl.c spl_array.c spl_directory.c spl_dllist.c spl_exceptions.c spl_fixedarray.c spl_functions.c spl_heap.c spl_iterators.c spl_observer.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC spl;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=spl

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


    header_path=ext/spl
    for header_file in php_spl.h spl_array.h spl_directory.h spl_dllist.h spl_exceptions.h spl_fixedarray.h spl_functions.h spl_heap.h spl_iterators.h spl_observer.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



  am_i_shared=$PHP_SPL_SHARED
  is_it_shared=$PHP_PCRE_SHARED
  is_it_enabled=$PHP_PCRE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension spl to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build spl shared or build pcre statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
    as_fn_error $? "
You've configured extension spl, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_SPL_SHARED
  is_it_shared=$PHP_STANDARD_SHARED
  is_it_enabled=$PHP_STANDARD
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension spl to build statically, but it
depends on extension standard, which you've configured to build shared.
You either need to build spl shared or build standard statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
    as_fn_error $? "
You've configured extension spl, which depends on extension standard,
but you've either not enabled standard, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_SPL_SHARED
  is_it_shared=$PHP_JSON_SHARED
  is_it_enabled=$PHP_JSON
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension spl to build statically, but it
depends on extension json, which you've configured to build shared.
You either need to build spl shared or build json statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension spl, which depends on extension json,
but you've either not enabled json, or have disabled it.
" "$LINENO" 5
  fi





{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether flush should be called explicitly after a buffered io" >&5
printf %s "checking whether flush should be called explicitly after a buffered io... " >&6; }
if test ${php_cv_have_flush_io+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_have_flush_io=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <string.h>

int main(void)
{
  char *filename = tmpnam(NULL);
  char buffer[64];
  int result = 0;

  FILE *fp = fopen(filename, "wb");
  if (NULL == fp) {
    return 0;
  }

  fputs("line 1\n", fp);
  fputs("line 2\n", fp);
  fclose(fp);

  fp = fopen(filename, "rb+");
  if (NULL == fp) {
    return 0;
  }

  if (fgets(buffer, sizeof(buffer), fp) == NULL) {
    fclose(fp);
    return 0;
  }

  fputs("line 3\n", fp);
  rewind(fp);
  if (fgets(buffer, sizeof(buffer), fp) == NULL) {
    fclose(fp);
    return 0;
  }

  if (0 != strcmp(buffer, "line 1\n")) {
    result = 1;
  }

  if (fgets(buffer, sizeof(buffer), fp) == NULL) {
    fclose(fp);
    return 0;
  }

  if (0 != strcmp(buffer, "line 3\n")) {
    result = 1;
  }

  fclose(fp);
  unlink(filename);

  return result;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_have_flush_io=no
else case e in #(
  e) php_cv_have_flush_io=yes ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_flush_io" >&5
printf "%s\n" "$php_cv_have_flush_io" >&6; }
if test "x$php_cv_have_flush_io" = xyes
then :

printf "%s\n" "#define HAVE_FLUSHIO 1" >>confdefs.h

fi


php_with_external_libcrypt=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external libcrypt or libxcrypt" >&5
printf %s "checking for external libcrypt or libxcrypt... " >&6; }

# Check whether --with-external-libcrypt was given.
if test ${with_external_libcrypt+y}
then :
  withval=$with_external_libcrypt; PHP_EXTERNAL_LIBCRYPT=$withval
else case e in #(
  e)
  PHP_EXTERNAL_LIBCRYPT=no

 ;;
esac
fi


ext_output=$PHP_EXTERNAL_LIBCRYPT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }






php_ext_standard_sources=
if test "x$PHP_EXTERNAL_LIBCRYPT" = xno
then :

  printf "%s\n" "#define PHP_USE_PHP_CRYPT_R 1" >>confdefs.h

  php_ext_standard_sources=" crypt_blowfish.c crypt_freesec.c crypt_sha256.c crypt_sha512.c php_crypt_r.c "

else case e in #(
  e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
printf %s "checking for library containing crypt... " >&6; }
if test ${ac_cv_search_crypt+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char crypt (void);
int
main (void)
{
return crypt ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' crypt
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_crypt=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_crypt+y}
then :
  break
fi
done
if test ${ac_cv_search_crypt+y}
then :

else case e in #(
  e) ac_cv_search_crypt=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
printf "%s\n" "$ac_cv_search_crypt" >&6; }
ac_res=$ac_cv_search_crypt
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

printf "%s\n" "#define HAVE_CRYPT 1" >>confdefs.h

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Cannot use external libcrypt as crypt() is missing.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
printf %s "checking for library containing crypt_r... " >&6; }
if test ${ac_cv_search_crypt_r+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char crypt_r (void);
int
main (void)
{
return crypt_r ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' crypt
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_crypt_r=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_crypt_r+y}
then :
  break
fi
done
if test ${ac_cv_search_crypt_r+y}
then :

else case e in #(
  e) ac_cv_search_crypt_r=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
printf "%s\n" "$ac_cv_search_crypt_r" >&6; }
ac_res=$ac_cv_search_crypt_r
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

printf "%s\n" "#define HAVE_CRYPT_R 1" >>confdefs.h

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Cannot use external libcrypt as crypt_r() is missing.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which data struct is used by crypt_r" >&5
printf %s "checking which data struct is used by crypt_r... " >&6; }
if test ${php_cv_crypt_r_style+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) php_cv_crypt_r_style=none
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _REENTRANT 1
#include <crypt.h>

int
main (void)
{

CRYPTD buffer;
crypt_r("passwd", "hash", &buffer);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_crypt_r_style=cryptd
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

if test "x$php_cv_crypt_r_style" = xnone
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _REENTRANT 1
#include <crypt.h>

int
main (void)
{

struct crypt_data buffer;
crypt_r("passwd", "hash", &buffer);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_crypt_r_style=struct_crypt_data
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

if test "x$php_cv_crypt_r_style" = xnone
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _REENTRANT 1
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <crypt.h>

int
main (void)
{

struct crypt_data buffer;
crypt_r("passwd", "hash", &buffer);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_crypt_r_style=struct_crypt_data_gnu_source
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

if test "x$php_cv_crypt_r_style" = xnone
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdlib.h>
#include <unistd.h>

int
main (void)
{

struct crypt_data buffer;
crypt_r("passwd", "hash", &buffer);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_crypt_r_style=struct_crypt_data
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_crypt_r_style" >&5
printf "%s\n" "$php_cv_crypt_r_style" >&6; }

if test "x$php_cv_crypt_r_style" = xcryptd
then :

printf "%s\n" "#define CRYPT_R_CRYPTD 1" >>confdefs.h

fi

case $php_cv_crypt_r_style in #(
  struct_crypt_data|struct_crypt_data_gnu_source) :

printf "%s\n" "#define CRYPT_R_STRUCT_CRYPT_DATA 1" >>confdefs.h
 ;; #(
  *) :
     ;;
esac

if test "x$php_cv_crypt_r_style" = xstruct_crypt_data_gnu_source
then :

printf "%s\n" "#define CRYPT_R_GNU_SOURCE 1" >>confdefs.h

fi

if test "x$php_cv_crypt_r_style" = xnone
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Unable to detect data struct used by crypt_r.
See 'config.log' for more details" "$LINENO" 5; }
fi

ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
if test "x$ac_cv_header_crypt_h" = xyes
then :
  printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard DES crypt" >&5
printf %s "checking for standard DES crypt... " >&6; }
if test ${ac_cv_crypt_des+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_crypt_des=yes
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif

#include <stdlib.h>
#include <string.h>

int main(void) {
  char *encrypted = crypt("rasmuslerdorf","rl");
  return !encrypted || strcmp(encrypted,"rl.3StKT.4T8M");
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_crypt_des=yes
else case e in #(
  e) ac_cv_crypt_des=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_des" >&5
printf "%s\n" "$ac_cv_crypt_des" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extended DES crypt" >&5
printf %s "checking for extended DES crypt... " >&6; }
if test ${ac_cv_crypt_ext_des+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_crypt_ext_des=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif

#include <stdlib.h>
#include <string.h>

int main(void) {
  char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
  return !encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc");
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_crypt_ext_des=yes
else case e in #(
  e) ac_cv_crypt_ext_des=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_ext_des" >&5
printf "%s\n" "$ac_cv_crypt_ext_des" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MD5 crypt" >&5
printf %s "checking for MD5 crypt... " >&6; }
if test ${ac_cv_crypt_md5+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_crypt_md5=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif

#include <stdlib.h>
#include <string.h>

int main(void) {
  char salt[15], answer[40];
  char *encrypted;

  salt[0]='$'; salt[1]='1'; salt[2]='$';
  salt[3]='r'; salt[4]='a'; salt[5]='s';
  salt[6]='m'; salt[7]='u'; salt[8]='s';
  salt[9]='l'; salt[10]='e'; salt[11]='$';
  salt[12]='\0';
  strcpy(answer,salt);
  strcat(answer,"rISCgZzpwk3UhDidwXvin0");
  encrypted = crypt("rasmuslerdorf",salt);
  return !encrypted || strcmp(encrypted,answer);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_crypt_md5=yes
else case e in #(
  e) ac_cv_crypt_md5=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_md5" >&5
printf "%s\n" "$ac_cv_crypt_md5" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Blowfish crypt" >&5
printf %s "checking for Blowfish crypt... " >&6; }
if test ${ac_cv_crypt_blowfish+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_crypt_blowfish=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif

#include <stdlib.h>
#include <string.h>

int main(void) {
  char salt[30], answer[70];
  char *encrypted;

  salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$';
  salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
  strcat(salt,"rasmuslerd............");
  strcpy(answer,salt);
  strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra");
  encrypted = crypt("rasmuslerdorf",salt);
  return !encrypted || strcmp(encrypted,answer);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_crypt_blowfish=yes
else case e in #(
  e) ac_cv_crypt_blowfish=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_blowfish" >&5
printf "%s\n" "$ac_cv_crypt_blowfish" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA512 crypt" >&5
printf %s "checking for SHA512 crypt... " >&6; }
if test ${ac_cv_crypt_sha512+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_crypt_sha512=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif

#include <stdlib.h>
#include <string.h>

int main(void) {
  char salt[21], answer[21+86];
  char *encrypted;

  strcpy(salt,"\$6\$rasmuslerdorf\$");
  strcpy(answer, salt);
  strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/");
  encrypted = crypt("rasmuslerdorf",salt);
  return !encrypted || strcmp(encrypted,answer);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_crypt_sha512=yes
else case e in #(
  e) ac_cv_crypt_sha512=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_sha512" >&5
printf "%s\n" "$ac_cv_crypt_sha512" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA256 crypt" >&5
printf %s "checking for SHA256 crypt... " >&6; }
if test ${ac_cv_crypt_sha256+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  ac_cv_crypt_sha256=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif

#include <stdlib.h>
#include <string.h>

int main(void) {
  char salt[21], answer[21+43];
  char *encrypted;

  strcpy(salt,"\$5\$rasmuslerdorf\$");
  strcpy(answer, salt);
  strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23");
  encrypted = crypt("rasmuslerdorf",salt);
  return !encrypted || strcmp(encrypted,answer);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_crypt_sha256=yes
else case e in #(
  e) ac_cv_crypt_sha256=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_sha256" >&5
printf "%s\n" "$ac_cv_crypt_sha256" >&6; }

  if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no"; then
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Cannot use external libcrypt as some algo are missing.
See 'config.log' for more details" "$LINENO" 5; }
  fi

  printf "%s\n" "#define PHP_USE_PHP_CRYPT_R 0" >>confdefs.h

 ;;
esac
fi

if test "x$cross_compiling" = xyes
then :
  case $host_alias in #(
  *linux*) :
    printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h
 ;; #(
  *) :
     ;;
esac
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working POSIX fnmatch" >&5
printf %s "checking for working POSIX fnmatch... " >&6; }
if test ${ac_cv_func_fnmatch_works+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) # Some versions of Solaris, SCO, and the GNU C Library
   # have a broken or incompatible fnmatch.
   # So we run a test program.  If we are cross-compiling, take no chance.
   # Thanks to John Oleynick, François Pinard, and Paul Eggert for this test.
   if test "$cross_compiling" = yes
then :
  ac_cv_func_fnmatch_works=cross
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fnmatch.h>
#	   define y(a, b, c) (fnmatch (a, b, c) == 0)
#	   define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)

int
main (void)
{
return
	   (!(y ("a*", "abc", 0)
	      && n ("d*/*1", "d/s/1", FNM_PATHNAME)
	      && y ("a\\\\bc", "abc", 0)
	      && n ("a\\\\bc", "abc", FNM_NOESCAPE)
	      && y ("*x", ".x", 0)
	      && n ("*x", ".x", FNM_PERIOD)
	      && 1));
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_fnmatch_works=yes
else case e in #(
  e) ac_cv_func_fnmatch_works=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fnmatch_works" >&5
printf "%s\n" "$ac_cv_func_fnmatch_works" >&6; }
if test $ac_cv_func_fnmatch_works = yes
then :

printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h

fi

 ;;
esac
fi


  for ac_func in fork CreateProcess
do :
  as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
  cat >>confdefs.h <<_ACEOF
#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1
_ACEOF
 php_can_support_proc_open=yes; break;
else case e in #(
  e) php_can_support_proc_open=no ;;
esac
fi

done
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if your OS can spawn processes with inherited handles" >&5
printf %s "checking if your OS can spawn processes with inherited handles... " >&6; }
if test "x$php_can_support_proc_open" = xyes
then :

printf "%s\n" "#define PHP_CAN_SUPPORT_PROC_OPEN 1" >>confdefs.h

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_can_support_proc_open" >&5
printf "%s\n" "$php_can_support_proc_open" >&6; }

PHP_ENABLE_CHROOT_FUNC=no
case "$PHP_SAPI" in
  embed)
    PHP_ENABLE_CHROOT_FUNC=yes
  ;;

  none)
    for PROG in $PHP_BINARIES; do
      case "$PROG" in
        cgi|cli|phpdbg)
          PHP_ENABLE_CHROOT_FUNC=yes
        ;;

        *)
          PHP_ENABLE_CHROOT_FUNC=no
          break
        ;;
      esac
   done
  ;;
esac

if test "x$PHP_ENABLE_CHROOT_FUNC" = xyes
then :

printf "%s\n" "#define ENABLE_CHROOT_FUNC 1" >>confdefs.h

fi


  unset ac_cv_func_res_nsearch
  unset ac_cv_func___res_nsearch
  unset found

  ac_fn_c_check_func "$LINENO" "res_nsearch" "ac_cv_func_res_nsearch"
if test "x$ac_cv_func_res_nsearch" = xyes
then :
  found=yes
else case e in #(
  e)  ac_fn_c_check_func "$LINENO" "__res_nsearch" "ac_cv_func___res_nsearch"
if test "x$ac_cv_func___res_nsearch" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
  ;;
esac
fi


  case $found in
  yes)

printf "%s\n" "#define HAVE_RES_NSEARCH 1" >>confdefs.h

    ac_cv_func_res_nsearch=yes
  ;;

    *)

  unset ac_cv_lib_resolv_res_nsearch
  unset ac_cv_lib_resolv___res_nsearch
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_nsearch in -lresolv" >&5
printf %s "checking for res_nsearch in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_res_nsearch+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char res_nsearch (void);
int
main (void)
{
return res_nsearch ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv_res_nsearch=yes
else case e in #(
  e) ac_cv_lib_resolv_res_nsearch=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_nsearch" >&5
printf "%s\n" "$ac_cv_lib_resolv_res_nsearch" >&6; }
if test "x$ac_cv_lib_resolv_res_nsearch" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __res_nsearch in -lresolv" >&5
printf %s "checking for __res_nsearch in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv___res_nsearch+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __res_nsearch (void);
int
main (void)
{
return __res_nsearch ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv___res_nsearch=yes
else case e in #(
  e) ac_cv_lib_resolv___res_nsearch=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_nsearch" >&5
printf "%s\n" "$ac_cv_lib_resolv___res_nsearch" >&6; }
if test "x$ac_cv_lib_resolv___res_nsearch" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lresolv"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case resolv in
  c|c_r) ;;
  *)
      LIBS="-lresolv $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_RES_NSEARCH 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h

    ac_cv_func_res_nsearch=yes
  else


  unset ac_cv_lib_socket_res_nsearch
  unset ac_cv_lib_socket___res_nsearch
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_nsearch in -lsocket" >&5
printf %s "checking for res_nsearch in -lsocket... " >&6; }
if test ${ac_cv_lib_socket_res_nsearch+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char res_nsearch (void);
int
main (void)
{
return res_nsearch ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket_res_nsearch=yes
else case e in #(
  e) ac_cv_lib_socket_res_nsearch=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_res_nsearch" >&5
printf "%s\n" "$ac_cv_lib_socket_res_nsearch" >&6; }
if test "x$ac_cv_lib_socket_res_nsearch" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __res_nsearch in -lsocket" >&5
printf %s "checking for __res_nsearch in -lsocket... " >&6; }
if test ${ac_cv_lib_socket___res_nsearch+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __res_nsearch (void);
int
main (void)
{
return __res_nsearch ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket___res_nsearch=yes
else case e in #(
  e) ac_cv_lib_socket___res_nsearch=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___res_nsearch" >&5
printf "%s\n" "$ac_cv_lib_socket___res_nsearch" >&6; }
if test "x$ac_cv_lib_socket___res_nsearch" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lsocket"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case socket in
  c|c_r) ;;
  *)
      LIBS="-lsocket $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_RES_NSEARCH 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h

    ac_cv_func_res_nsearch=yes
  else

  :

  fi


  fi

 ;;

  esac


  unset ac_cv_func_res_ndestroy
  unset ac_cv_func___res_ndestroy
  unset found

  ac_fn_c_check_func "$LINENO" "res_ndestroy" "ac_cv_func_res_ndestroy"
if test "x$ac_cv_func_res_ndestroy" = xyes
then :
  found=yes
else case e in #(
  e)  ac_fn_c_check_func "$LINENO" "__res_ndestroy" "ac_cv_func___res_ndestroy"
if test "x$ac_cv_func___res_ndestroy" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
  ;;
esac
fi


  case $found in
  yes)

printf "%s\n" "#define HAVE_RES_NDESTROY 1" >>confdefs.h

    ac_cv_func_res_ndestroy=yes
  ;;

    *)

  unset ac_cv_lib_resolv_res_ndestroy
  unset ac_cv_lib_resolv___res_ndestroy
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_ndestroy in -lresolv" >&5
printf %s "checking for res_ndestroy in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_res_ndestroy+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char res_ndestroy (void);
int
main (void)
{
return res_ndestroy ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv_res_ndestroy=yes
else case e in #(
  e) ac_cv_lib_resolv_res_ndestroy=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_ndestroy" >&5
printf "%s\n" "$ac_cv_lib_resolv_res_ndestroy" >&6; }
if test "x$ac_cv_lib_resolv_res_ndestroy" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __res_ndestroy in -lresolv" >&5
printf %s "checking for __res_ndestroy in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv___res_ndestroy+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __res_ndestroy (void);
int
main (void)
{
return __res_ndestroy ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv___res_ndestroy=yes
else case e in #(
  e) ac_cv_lib_resolv___res_ndestroy=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_ndestroy" >&5
printf "%s\n" "$ac_cv_lib_resolv___res_ndestroy" >&6; }
if test "x$ac_cv_lib_resolv___res_ndestroy" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lresolv"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case resolv in
  c|c_r) ;;
  *)
      LIBS="-lresolv $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_RES_NDESTROY 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h

    ac_cv_func_res_ndestroy=yes
  else


  unset ac_cv_lib_socket_res_ndestroy
  unset ac_cv_lib_socket___res_ndestroy
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_ndestroy in -lsocket" >&5
printf %s "checking for res_ndestroy in -lsocket... " >&6; }
if test ${ac_cv_lib_socket_res_ndestroy+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char res_ndestroy (void);
int
main (void)
{
return res_ndestroy ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket_res_ndestroy=yes
else case e in #(
  e) ac_cv_lib_socket_res_ndestroy=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_res_ndestroy" >&5
printf "%s\n" "$ac_cv_lib_socket_res_ndestroy" >&6; }
if test "x$ac_cv_lib_socket_res_ndestroy" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __res_ndestroy in -lsocket" >&5
printf %s "checking for __res_ndestroy in -lsocket... " >&6; }
if test ${ac_cv_lib_socket___res_ndestroy+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __res_ndestroy (void);
int
main (void)
{
return __res_ndestroy ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket___res_ndestroy=yes
else case e in #(
  e) ac_cv_lib_socket___res_ndestroy=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___res_ndestroy" >&5
printf "%s\n" "$ac_cv_lib_socket___res_ndestroy" >&6; }
if test "x$ac_cv_lib_socket___res_ndestroy" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lsocket"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case socket in
  c|c_r) ;;
  *)
      LIBS="-lsocket $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_RES_NDESTROY 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h

    ac_cv_func_res_ndestroy=yes
  else

  :

  fi


  fi

 ;;

  esac


  unset ac_cv_func_dns_search
  unset ac_cv_func___dns_search
  unset found

  ac_fn_c_check_func "$LINENO" "dns_search" "ac_cv_func_dns_search"
if test "x$ac_cv_func_dns_search" = xyes
then :
  found=yes
else case e in #(
  e)  ac_fn_c_check_func "$LINENO" "__dns_search" "ac_cv_func___dns_search"
if test "x$ac_cv_func___dns_search" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
  ;;
esac
fi


  case $found in
  yes)

printf "%s\n" "#define HAVE_DNS_SEARCH 1" >>confdefs.h

    ac_cv_func_dns_search=yes
  ;;

    *)

  unset ac_cv_lib_resolv_dns_search
  unset ac_cv_lib_resolv___dns_search
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dns_search in -lresolv" >&5
printf %s "checking for dns_search in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_dns_search+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dns_search (void);
int
main (void)
{
return dns_search ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv_dns_search=yes
else case e in #(
  e) ac_cv_lib_resolv_dns_search=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_dns_search" >&5
printf "%s\n" "$ac_cv_lib_resolv_dns_search" >&6; }
if test "x$ac_cv_lib_resolv_dns_search" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __dns_search in -lresolv" >&5
printf %s "checking for __dns_search in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv___dns_search+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __dns_search (void);
int
main (void)
{
return __dns_search ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv___dns_search=yes
else case e in #(
  e) ac_cv_lib_resolv___dns_search=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dns_search" >&5
printf "%s\n" "$ac_cv_lib_resolv___dns_search" >&6; }
if test "x$ac_cv_lib_resolv___dns_search" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lresolv"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case resolv in
  c|c_r) ;;
  *)
      LIBS="-lresolv $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_DNS_SEARCH 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h

    ac_cv_func_dns_search=yes
  else


  unset ac_cv_lib_socket_dns_search
  unset ac_cv_lib_socket___dns_search
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dns_search in -lsocket" >&5
printf %s "checking for dns_search in -lsocket... " >&6; }
if test ${ac_cv_lib_socket_dns_search+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dns_search (void);
int
main (void)
{
return dns_search ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket_dns_search=yes
else case e in #(
  e) ac_cv_lib_socket_dns_search=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_dns_search" >&5
printf "%s\n" "$ac_cv_lib_socket_dns_search" >&6; }
if test "x$ac_cv_lib_socket_dns_search" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __dns_search in -lsocket" >&5
printf %s "checking for __dns_search in -lsocket... " >&6; }
if test ${ac_cv_lib_socket___dns_search+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __dns_search (void);
int
main (void)
{
return __dns_search ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket___dns_search=yes
else case e in #(
  e) ac_cv_lib_socket___dns_search=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___dns_search" >&5
printf "%s\n" "$ac_cv_lib_socket___dns_search" >&6; }
if test "x$ac_cv_lib_socket___dns_search" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lsocket"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case socket in
  c|c_r) ;;
  *)
      LIBS="-lsocket $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_DNS_SEARCH 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h

    ac_cv_func_dns_search=yes
  else

  :

  fi


  fi

 ;;

  esac


  unset ac_cv_func_dn_expand
  unset ac_cv_func___dn_expand
  unset found

  ac_fn_c_check_func "$LINENO" "dn_expand" "ac_cv_func_dn_expand"
if test "x$ac_cv_func_dn_expand" = xyes
then :
  found=yes
else case e in #(
  e)  ac_fn_c_check_func "$LINENO" "__dn_expand" "ac_cv_func___dn_expand"
if test "x$ac_cv_func___dn_expand" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
  ;;
esac
fi


  case $found in
  yes)

printf "%s\n" "#define HAVE_DN_EXPAND 1" >>confdefs.h

    ac_cv_func_dn_expand=yes
  ;;

    *)

  unset ac_cv_lib_resolv_dn_expand
  unset ac_cv_lib_resolv___dn_expand
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dn_expand in -lresolv" >&5
printf %s "checking for dn_expand in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_dn_expand+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dn_expand (void);
int
main (void)
{
return dn_expand ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv_dn_expand=yes
else case e in #(
  e) ac_cv_lib_resolv_dn_expand=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_dn_expand" >&5
printf "%s\n" "$ac_cv_lib_resolv_dn_expand" >&6; }
if test "x$ac_cv_lib_resolv_dn_expand" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __dn_expand in -lresolv" >&5
printf %s "checking for __dn_expand in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv___dn_expand+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __dn_expand (void);
int
main (void)
{
return __dn_expand ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv___dn_expand=yes
else case e in #(
  e) ac_cv_lib_resolv___dn_expand=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
printf "%s\n" "$ac_cv_lib_resolv___dn_expand" >&6; }
if test "x$ac_cv_lib_resolv___dn_expand" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lresolv"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case resolv in
  c|c_r) ;;
  *)
      LIBS="-lresolv $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_DN_EXPAND 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h

    ac_cv_func_dn_expand=yes
  else


  unset ac_cv_lib_socket_dn_expand
  unset ac_cv_lib_socket___dn_expand
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dn_expand in -lsocket" >&5
printf %s "checking for dn_expand in -lsocket... " >&6; }
if test ${ac_cv_lib_socket_dn_expand+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dn_expand (void);
int
main (void)
{
return dn_expand ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket_dn_expand=yes
else case e in #(
  e) ac_cv_lib_socket_dn_expand=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_dn_expand" >&5
printf "%s\n" "$ac_cv_lib_socket_dn_expand" >&6; }
if test "x$ac_cv_lib_socket_dn_expand" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __dn_expand in -lsocket" >&5
printf %s "checking for __dn_expand in -lsocket... " >&6; }
if test ${ac_cv_lib_socket___dn_expand+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __dn_expand (void);
int
main (void)
{
return __dn_expand ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket___dn_expand=yes
else case e in #(
  e) ac_cv_lib_socket___dn_expand=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___dn_expand" >&5
printf "%s\n" "$ac_cv_lib_socket___dn_expand" >&6; }
if test "x$ac_cv_lib_socket___dn_expand" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lsocket"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case socket in
  c|c_r) ;;
  *)
      LIBS="-lsocket $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_DN_EXPAND 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h

    ac_cv_func_dn_expand=yes
  else

  :

  fi


  fi

 ;;

  esac


  unset ac_cv_func_dn_skipname
  unset ac_cv_func___dn_skipname
  unset found

  ac_fn_c_check_func "$LINENO" "dn_skipname" "ac_cv_func_dn_skipname"
if test "x$ac_cv_func_dn_skipname" = xyes
then :
  found=yes
else case e in #(
  e)  ac_fn_c_check_func "$LINENO" "__dn_skipname" "ac_cv_func___dn_skipname"
if test "x$ac_cv_func___dn_skipname" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
  ;;
esac
fi


  case $found in
  yes)

printf "%s\n" "#define HAVE_DN_SKIPNAME 1" >>confdefs.h

    ac_cv_func_dn_skipname=yes
  ;;

    *)

  unset ac_cv_lib_resolv_dn_skipname
  unset ac_cv_lib_resolv___dn_skipname
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dn_skipname in -lresolv" >&5
printf %s "checking for dn_skipname in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_dn_skipname+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dn_skipname (void);
int
main (void)
{
return dn_skipname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv_dn_skipname=yes
else case e in #(
  e) ac_cv_lib_resolv_dn_skipname=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_dn_skipname" >&5
printf "%s\n" "$ac_cv_lib_resolv_dn_skipname" >&6; }
if test "x$ac_cv_lib_resolv_dn_skipname" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __dn_skipname in -lresolv" >&5
printf %s "checking for __dn_skipname in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv___dn_skipname+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __dn_skipname (void);
int
main (void)
{
return __dn_skipname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv___dn_skipname=yes
else case e in #(
  e) ac_cv_lib_resolv___dn_skipname=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_skipname" >&5
printf "%s\n" "$ac_cv_lib_resolv___dn_skipname" >&6; }
if test "x$ac_cv_lib_resolv___dn_skipname" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lresolv"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case resolv in
  c|c_r) ;;
  *)
      LIBS="-lresolv $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_DN_SKIPNAME 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h

    ac_cv_func_dn_skipname=yes
  else


  unset ac_cv_lib_socket_dn_skipname
  unset ac_cv_lib_socket___dn_skipname
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dn_skipname in -lsocket" >&5
printf %s "checking for dn_skipname in -lsocket... " >&6; }
if test ${ac_cv_lib_socket_dn_skipname+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dn_skipname (void);
int
main (void)
{
return dn_skipname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket_dn_skipname=yes
else case e in #(
  e) ac_cv_lib_socket_dn_skipname=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_dn_skipname" >&5
printf "%s\n" "$ac_cv_lib_socket_dn_skipname" >&6; }
if test "x$ac_cv_lib_socket_dn_skipname" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __dn_skipname in -lsocket" >&5
printf %s "checking for __dn_skipname in -lsocket... " >&6; }
if test ${ac_cv_lib_socket___dn_skipname+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __dn_skipname (void);
int
main (void)
{
return __dn_skipname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket___dn_skipname=yes
else case e in #(
  e) ac_cv_lib_socket___dn_skipname=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___dn_skipname" >&5
printf "%s\n" "$ac_cv_lib_socket___dn_skipname" >&6; }
if test "x$ac_cv_lib_socket___dn_skipname" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lsocket"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case socket in
  c|c_r) ;;
  *)
      LIBS="-lsocket $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_DN_SKIPNAME 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h

    ac_cv_func_dn_skipname=yes
  else

  :

  fi


  fi

 ;;

  esac




  unset ac_cv_func_res_search
  unset ac_cv_func___res_search
  unset found

  ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
if test "x$ac_cv_func_res_search" = xyes
then :
  found=yes
else case e in #(
  e)  ac_fn_c_check_func "$LINENO" "__res_search" "ac_cv_func___res_search"
if test "x$ac_cv_func___res_search" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
  ;;
esac
fi


  case $found in
  yes)

printf "%s\n" "#define HAVE_RES_SEARCH 1" >>confdefs.h

    ac_cv_func_res_search=yes
  ;;

    *)

  unset ac_cv_lib_resolv_res_search
  unset ac_cv_lib_resolv___res_search
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
printf %s "checking for res_search in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_res_search+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char res_search (void);
int
main (void)
{
return res_search ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv_res_search=yes
else case e in #(
  e) ac_cv_lib_resolv_res_search=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
printf "%s\n" "$ac_cv_lib_resolv_res_search" >&6; }
if test "x$ac_cv_lib_resolv_res_search" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __res_search in -lresolv" >&5
printf %s "checking for __res_search in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv___res_search+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __res_search (void);
int
main (void)
{
return __res_search ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv___res_search=yes
else case e in #(
  e) ac_cv_lib_resolv___res_search=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_search" >&5
printf "%s\n" "$ac_cv_lib_resolv___res_search" >&6; }
if test "x$ac_cv_lib_resolv___res_search" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lresolv"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case resolv in
  c|c_r) ;;
  *)
      LIBS="-lresolv $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_RES_SEARCH 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h

    ac_cv_func_res_search=yes
  else


  unset ac_cv_lib_socket_res_search
  unset ac_cv_lib_socket___res_search
  unset found
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_search in -lsocket" >&5
printf %s "checking for res_search in -lsocket... " >&6; }
if test ${ac_cv_lib_socket_res_search+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char res_search (void);
int
main (void)
{
return res_search ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket_res_search=yes
else case e in #(
  e) ac_cv_lib_socket_res_search=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_res_search" >&5
printf "%s\n" "$ac_cv_lib_socket_res_search" >&6; }
if test "x$ac_cv_lib_socket_res_search" = xyes
then :
  found=yes
else case e in #(
  e)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __res_search in -lsocket" >&5
printf %s "checking for __res_search in -lsocket... " >&6; }
if test ${ac_cv_lib_socket___res_search+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char __res_search (void);
int
main (void)
{
return __res_search ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_socket___res_search=yes
else case e in #(
  e) ac_cv_lib_socket___res_search=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___res_search" >&5
printf "%s\n" "$ac_cv_lib_socket___res_search" >&6; }
if test "x$ac_cv_lib_socket___res_search" = xyes
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi

   ;;
esac
fi


  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -lsocket"
    if test "$cross_compiling" = yes
then :

            found=yes

else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  found=yes
else case e in #(
  e) found=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LIBS=$ac_libs
  fi

  if test "$found" = "yes"; then


  case socket in
  c|c_r) ;;
  *)
      LIBS="-lsocket $LIBS"
   ;;
  esac



printf "%s\n" "#define HAVE_RES_SEARCH 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h

    ac_cv_func_res_search=yes
  else

  :

  fi


  fi

 ;;

  esac


ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_addchdir_np" "ac_cv_func_posix_spawn_file_actions_addchdir_np"
if test "x$ac_cv_func_posix_spawn_file_actions_addchdir_np" = xyes
then :
  printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "elf_aux_info" "ac_cv_func_elf_aux_info"
if test "x$ac_cv_func_elf_aux_info" = xyes
then :
  printf "%s\n" "#define HAVE_ELF_AUX_INFO 1" >>confdefs.h

fi


ac_fn_check_decl "$LINENO" "strptime" "ac_cv_have_decl_strptime" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strptime" = xyes
then :

printf "%s\n" "#define HAVE_DECL_STRPTIME 1" >>confdefs.h

fi


php_with_password_argon2=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Argon2 support" >&5
printf %s "checking for Argon2 support... " >&6; }

# Check whether --with-password-argon2 was given.
if test ${with_password_argon2+y}
then :
  withval=$with_password_argon2; PHP_PASSWORD_ARGON2=$withval
else case e in #(
  e)
  PHP_PASSWORD_ARGON2=no
  test "$PHP_ENABLE_ALL" && PHP_PASSWORD_ARGON2=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PASSWORD_ARGON2 in
shared,*)
  PHP_PASSWORD_ARGON2=$(echo "$PHP_PASSWORD_ARGON2"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PASSWORD_ARGON2=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_PASSWORD_ARGON2" = xno
then :

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libargon2" >&5
printf %s "checking for libargon2... " >&6; }

if test -n "$ARGON2_CFLAGS"; then
    pkg_cv_ARGON2_CFLAGS="$ARGON2_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libargon2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libargon2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ARGON2_CFLAGS=`$PKG_CONFIG --cflags "libargon2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ARGON2_LIBS"; then
    pkg_cv_ARGON2_LIBS="$ARGON2_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libargon2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libargon2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ARGON2_LIBS=`$PKG_CONFIG --libs "libargon2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ARGON2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libargon2" 2>&1`
        else
	        ARGON2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libargon2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ARGON2_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libargon2) were not met:

$ARGON2_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ARGON2_CFLAGS
and ARGON2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ARGON2_CFLAGS
and ARGON2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ARGON2_CFLAGS=$pkg_cv_ARGON2_CFLAGS
	ARGON2_LIBS=$pkg_cv_ARGON2_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $ARGON2_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $ARGON2_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ="$ -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_ARGON2LIB 1" >>confdefs.h

 ;;
esac
fi

ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "  #ifdef HAVE_SYS_SOCKET_H
  #include <sys/socket.h>
  #endif

"
if test "x$ac_cv_header_net_if_h" = xyes
then :
  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable getifaddrs" >&5
printf %s "checking for usable getifaddrs... " >&6; }
if test ${php_cv_func_getifaddrs+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <sys/types.h>
  #include <ifaddrs.h>

int
main (void)
{

  struct ifaddrs *interfaces;
  if (!getifaddrs(&interfaces)) {
    freeifaddrs(interfaces);
  }

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_func_getifaddrs=yes
else case e in #(
  e) php_cv_func_getifaddrs=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_func_getifaddrs" >&5
printf "%s\n" "$php_cv_func_getifaddrs" >&6; }
if test "x$php_cv_func_getifaddrs" = xyes
then :

printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h

fi


  ext_builddir=ext/standard
  ext_srcdir=$abs_srcdir/ext/standard
  ext_dir=ext/standard

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_STANDARD_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in array.c assert.c base64.c basic_functions.c browscap.c crc32_x86.c crc32.c credits.c crypt.c css.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c filters.c flock_compat.c formatted_print.c fsock.c ftok.c ftp_fopen_wrapper.c head.c hrtime.c html.c http_fopen_wrapper.c http.c image.c incomplete_class.c info.c iptc.c levenshtein.c libavifinfo/avifinfo.c link.c mail.c math.c md5.c metaphone.c microtime.c net.c pack.c pageinfo.c password.c php_fopen_wrapper.c proc_open.c quot_print.c scanf.c sha1.c soundex.c streamsfuncs.c string.c strnatcmp.c syslog.c type.c uniqid.c url_scanner_ex.c url.c user_filters.c uuencode.c var_unserializer.c var.c versioning.c $php_ext_standard_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC standard;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC standard;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_STANDARD_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in array.c assert.c base64.c basic_functions.c browscap.c crc32_x86.c crc32.c credits.c crypt.c css.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c filters.c flock_compat.c formatted_print.c fsock.c ftok.c ftp_fopen_wrapper.c head.c hrtime.c html.c http_fopen_wrapper.c http.c image.c incomplete_class.c info.c iptc.c levenshtein.c libavifinfo/avifinfo.c link.c mail.c math.c md5.c metaphone.c microtime.c net.c pack.c pageinfo.c password.c php_fopen_wrapper.c proc_open.c quot_print.c scanf.c sha1.c soundex.c streamsfuncs.c string.c strnatcmp.c syslog.c type.c uniqid.c url_scanner_ex.c url.c user_filters.c uuencode.c var_unserializer.c var.c versioning.c $php_ext_standard_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_standard="$shared_objects_standard $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/standard.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/standard.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_standard"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/standard.$suffix: $ext_builddir/standard.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/standard.$suffix \$(phplibdir)

$ext_builddir/standard.$suffix: \$(shared_objects_standard) \$(STANDARD_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_standard) \$(STANDARD_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_STANDARD 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_STANDARD_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in array.c assert.c base64.c basic_functions.c browscap.c crc32_x86.c crc32.c credits.c crypt.c css.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c filters.c flock_compat.c formatted_print.c fsock.c ftok.c ftp_fopen_wrapper.c head.c hrtime.c html.c http_fopen_wrapper.c http.c image.c incomplete_class.c info.c iptc.c levenshtein.c libavifinfo/avifinfo.c link.c mail.c math.c md5.c metaphone.c microtime.c net.c pack.c pageinfo.c password.c php_fopen_wrapper.c proc_open.c quot_print.c scanf.c sha1.c soundex.c streamsfuncs.c string.c strnatcmp.c syslog.c type.c uniqid.c url_scanner_ex.c url.c user_filters.c uuencode.c var_unserializer.c var.c versioning.c $php_ext_standard_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC standard;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in array.c assert.c base64.c basic_functions.c browscap.c crc32_x86.c crc32.c credits.c crypt.c css.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c filters.c flock_compat.c formatted_print.c fsock.c ftok.c ftp_fopen_wrapper.c head.c hrtime.c html.c http_fopen_wrapper.c http.c image.c incomplete_class.c info.c iptc.c levenshtein.c libavifinfo/avifinfo.c link.c mail.c math.c md5.c metaphone.c microtime.c net.c pack.c pageinfo.c password.c php_fopen_wrapper.c proc_open.c quot_print.c scanf.c sha1.c soundex.c streamsfuncs.c string.c strnatcmp.c syslog.c type.c uniqid.c url_scanner_ex.c url.c user_filters.c uuencode.c var_unserializer.c var.c versioning.c $php_ext_standard_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC standard;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=standard

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


as_fn_append BUILD_DIR " $ext_builddir/libavifinfo"


  src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments


    for header_file in ext/standard/; do


  unique=$(echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
  fi

    done







php_enable_sysvmsg=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable System V IPC support" >&5
printf %s "checking whether to enable System V IPC support... " >&6; }
# Check whether --enable-sysvmsg was given.
if test ${enable_sysvmsg+y}
then :
  enableval=$enable_sysvmsg; PHP_SYSVMSG=$enableval
else case e in #(
  e)
  PHP_SYSVMSG=no
  test "$PHP_ENABLE_ALL" && PHP_SYSVMSG=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SYSVMSG in
shared,*)
  PHP_SYSVMSG=$(echo "$PHP_SYSVMSG"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SYSVMSG=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SYSVMSG" != "no"; then
  ac_fn_c_check_header_compile "$LINENO" "sys/msg.h" "ac_cv_header_sys_msg_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_msg_h" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Cannot enable System V IPC support. Required <sys/msg.h> header file not
found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi



printf "%s\n" "#define HAVE_SYSVMSG 1" >>confdefs.h


  ext_builddir=ext/sysvmsg
  ext_srcdir=$abs_srcdir/ext/sysvmsg
  ext_dir=ext/sysvmsg

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SYSVMSG_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvmsg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC sysvmsg;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvmsg;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SYSVMSG_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in sysvmsg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_sysvmsg="$shared_objects_sysvmsg $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvmsg.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvmsg.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvmsg"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/sysvmsg.$suffix: $ext_builddir/sysvmsg.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/sysvmsg.$suffix \$(phplibdir)

$ext_builddir/sysvmsg.$suffix: \$(shared_objects_sysvmsg) \$(SYSVMSG_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_sysvmsg) \$(SYSVMSG_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SYSVMSG 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SYSVMSG_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvmsg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC sysvmsg;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvmsg.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvmsg;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=sysvmsg

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

fi





php_enable_sysvsem=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable System V semaphore support" >&5
printf %s "checking whether to enable System V semaphore support... " >&6; }
# Check whether --enable-sysvsem was given.
if test ${enable_sysvsem+y}
then :
  enableval=$enable_sysvsem; PHP_SYSVSEM=$enableval
else case e in #(
  e)
  PHP_SYSVSEM=no
  test "$PHP_ENABLE_ALL" && PHP_SYSVSEM=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SYSVSEM in
shared,*)
  PHP_SYSVSEM=$(echo "$PHP_SYSVSEM"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SYSVSEM=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SYSVSEM" != "no"; then

  ext_builddir=ext/sysvsem
  ext_srcdir=$abs_srcdir/ext/sysvsem
  ext_dir=ext/sysvsem

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SYSVSEM_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvsem.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC sysvsem;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvsem;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SYSVSEM_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in sysvsem.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_sysvsem="$shared_objects_sysvsem $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvsem.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvsem.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvsem"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/sysvsem.$suffix: $ext_builddir/sysvsem.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/sysvsem.$suffix \$(phplibdir)

$ext_builddir/sysvsem.$suffix: \$(shared_objects_sysvsem) \$(SYSVSEM_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_sysvsem) \$(SYSVSEM_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SYSVSEM 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SYSVSEM_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvsem.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC sysvsem;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvsem.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvsem;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=sysvsem

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


printf "%s\n" "#define HAVE_SYSVSEM 1" >>confdefs.h

  ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "
    #include <sys/types.h>
    #include <sys/ipc.h>
    #include <sys/sem.h>

"
if test "x$ac_cv_type_union_semun" = xyes
then :

printf "%s\n" "#define HAVE_UNION_SEMUN 1" >>confdefs.h


fi

fi





php_enable_sysvshm=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable System V shared memory support" >&5
printf %s "checking whether to enable System V shared memory support... " >&6; }
# Check whether --enable-sysvshm was given.
if test ${enable_sysvshm+y}
then :
  enableval=$enable_sysvshm; PHP_SYSVSHM=$enableval
else case e in #(
  e)
  PHP_SYSVSHM=no
  test "$PHP_ENABLE_ALL" && PHP_SYSVSHM=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_SYSVSHM in
shared,*)
  PHP_SYSVSHM=$(echo "$PHP_SYSVSHM"|$SED 's/^shared,//')
  ;;
shared)
  PHP_SYSVSHM=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_SYSVSHM" != "no"; then

printf "%s\n" "#define HAVE_SYSVSHM 1" >>confdefs.h


  ext_builddir=ext/sysvshm
  ext_srcdir=$abs_srcdir/ext/sysvshm
  ext_dir=ext/sysvshm

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_SYSVSHM_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvshm.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC sysvshm;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC sysvshm;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_SYSVSHM_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in sysvshm.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_sysvshm="$shared_objects_sysvshm $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/sysvshm.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/sysvshm.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_sysvshm"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/sysvshm.$suffix: $ext_builddir/sysvshm.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/sysvshm.$suffix \$(phplibdir)

$ext_builddir/sysvshm.$suffix: \$(shared_objects_sysvshm) \$(SYSVSHM_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_sysvshm) \$(SYSVSHM_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_SYSVSHM 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_SYSVSHM_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvshm.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC sysvshm;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in sysvshm.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC sysvshm;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=sysvshm

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

fi





php_with_tidy=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIDY support" >&5
printf %s "checking for TIDY support... " >&6; }

# Check whether --with-tidy was given.
if test ${with_tidy+y}
then :
  withval=$with_tidy; PHP_TIDY=$withval
else case e in #(
  e)
  PHP_TIDY=no
  test "$PHP_ENABLE_ALL" && PHP_TIDY=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_TIDY in
shared,*)
  PHP_TIDY=$(echo "$PHP_TIDY"|$SED 's/^shared,//')
  ;;
shared)
  PHP_TIDY=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_TIDY" != "no"; then
  if test "x$PHP_TIDY" = xyes
then :
  TIDY_SEARCH_DIRS="/usr/local /usr"
else case e in #(
  e) TIDY_SEARCH_DIRS=$PHP_TIDY ;;
esac
fi

  for i in $TIDY_SEARCH_DIRS; do
    for j in tidy tidyp; do
      if test -f $i/include/$j/$j.h
then :

        TIDY_DIR=$i
        TIDY_INCDIR=$i/include/$j
        TIDY_LIB_NAME=$j
        break 2

elif test -f $i/include/$j.h
then :

        TIDY_DIR=$i
        TIDY_INCDIR=$i/include
        TIDY_LIB_NAME=$j
        break 2

fi
    done
  done

  if ${TIDY_DIR:+false} :
then :
  as_fn_error $? "Cannot find libtidy" "$LINENO" 5
fi

        if test -f "$TIDY_INCDIR/tidybuffio.h"
then :

printf "%s\n" "#define HAVE_TIDYBUFFIO_H 1" >>confdefs.h

fi

  TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR
  if test "x$TIDY_LIB_NAME" = xtidyp
then :

printf "%s\n" "#define HAVE_TIDYP_H 1" >>confdefs.h

else case e in #(
  e)
printf "%s\n" "#define HAVE_TIDY_H 1" >>confdefs.h
 ;;
esac
fi


  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$TIDY_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$TIDY_LIB_NAME""_tidyOptGetDoc" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tidyOptGetDoc in -l$TIDY_LIB_NAME" >&5
printf %s "checking for tidyOptGetDoc in -l$TIDY_LIB_NAME... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$TIDY_LIB_NAME  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char tidyOptGetDoc (void);
int
main (void)
{
return tidyOptGetDoc ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_TIDYOPTGETDOC 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$TIDY_LIB_NAME_tidyOptGetDoc

  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$TIDY_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tidyOptGetDoc in -ltidy5" >&5
printf %s "checking for tidyOptGetDoc in -ltidy5... " >&6; }
if test ${ac_cv_lib_tidy5_tidyOptGetDoc+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ltidy5  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char tidyOptGetDoc (void);
int
main (void)
{
return tidyOptGetDoc ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_tidy5_tidyOptGetDoc=yes
else case e in #(
  e) ac_cv_lib_tidy5_tidyOptGetDoc=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tidy5_tidyOptGetDoc" >&5
printf "%s\n" "$ac_cv_lib_tidy5_tidyOptGetDoc" >&6; }
if test "x$ac_cv_lib_tidy5_tidyOptGetDoc" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    TIDY_LIB_NAME=tidy5
      printf "%s\n" "#define HAVE_TIDYOPTGETDOC 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_tidy5_tidyOptGetDoc

   ;;
esac
fi

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="-L$TIDY_LIBDIR"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  as_ac_Lib=`printf "%s\n" "ac_cv_lib_$TIDY_LIB_NAME""_tidyReleaseDate" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tidyReleaseDate in -l$TIDY_LIB_NAME" >&5
printf %s "checking for tidyReleaseDate in -l$TIDY_LIB_NAME... " >&6; }
if eval test \${$as_ac_Lib+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-l$TIDY_LIB_NAME  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char tidyReleaseDate (void);
int
main (void)
{
return tidyReleaseDate ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_ac_Lib=yes"
else case e in #(
  e) eval "$as_ac_Lib=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
eval ac_res=\$$as_ac_Lib
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_TIDYRELEASEDATE 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_$TIDY_LIB_NAME_tidyReleaseDate

   ;;
esac
fi




  if test "$ext_shared" = "yes"; then
    TIDY_SHARED_LIBADD="-l$TIDY_LIB_NAME $TIDY_SHARED_LIBADD"
    if test -n "$TIDY_LIBDIR"; then

  if test "$TIDY_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TIDY_LIBDIR" != "/usr/lib"; then

  if test -z "$TIDY_LIBDIR" || echo "$TIDY_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$TIDY_LIBDIR
  else

    ep_dir=$(echo $TIDY_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$TIDY_LIBDIR")
  fi


      if test "$ext_shared" = "yes"; then
        TIDY_SHARED_LIBADD="-L$ai_p $TIDY_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && TIDY_SHARED_LIBADD="$ld_runpath_switch$ai_p $TIDY_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

    fi
  else


  if test -n "$TIDY_LIBDIR"; then

  if test "$TIDY_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$TIDY_LIBDIR" != "/usr/lib"; then

  if test -z "$TIDY_LIBDIR" || echo "$TIDY_LIBDIR" | grep '^/' >/dev/null ; then
    ai_p=$TIDY_LIBDIR
  else

    ep_dir=$(echo $TIDY_LIBDIR|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$TIDY_LIBDIR")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

  fi


  case $TIDY_LIB_NAME in
  c|c_r) ;;
  *)
      LIBS="-l$TIDY_LIB_NAME $LIBS"
   ;;
  esac




  fi



for include_path in $TIDY_INCDIR; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


  old_CPPFLAGS=$CPPFLAGS
  CPPFLAGS=-I$TIDY_INCDIR

        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tidyOptGetCategory" >&5
printf %s "checking for tidyOptGetCategory... " >&6; }
if test ${php_ac_cv_have_tidyoptgetcategory+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <tidy.h>
int
main (void)
{

     TidyDoc doc = tidyCreate();
     TidyOption badopt = tidyGetOptionByName(doc, "<bad>");
     Bool v = (tidyOptGetCategory(badopt) == TidyInternalCategory);
     (void)v;
     tidyRelease(doc);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_ac_cv_have_tidyoptgetcategory=yes
else case e in #(
  e) php_ac_cv_have_tidyoptgetcategory=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_ac_cv_have_tidyoptgetcategory" >&5
printf "%s\n" "$php_ac_cv_have_tidyoptgetcategory" >&6; }
  if test "x$php_ac_cv_have_tidyoptgetcategory" = xyes
then :

printf "%s\n" "#define HAVE_TIDYOPTGETCATEGORY 1" >>confdefs.h

fi

  CPPFLAGS=$old_CPPFLAGS


  ext_builddir=ext/tidy
  ext_srcdir=$abs_srcdir/ext/tidy
  ext_dir=ext/tidy

  ac_extra=$(echo "-Wno-ignored-qualifiers -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_TIDY_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in tidy.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC tidy;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC tidy;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_TIDY_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in tidy.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_tidy="$shared_objects_tidy $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/tidy.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/tidy.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tidy"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/tidy.$suffix: $ext_builddir/tidy.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/tidy.$suffix \$(phplibdir)

$ext_builddir/tidy.$suffix: \$(shared_objects_tidy) \$(TIDY_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_tidy) \$(TIDY_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_TIDY 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_TIDY_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in tidy.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC tidy;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in tidy.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC tidy;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=tidy

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST TIDY_SHARED_LIBADD"


printf "%s\n" "#define HAVE_TIDY 1" >>confdefs.h

fi





php_enable_tokenizer=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable tokenizer support" >&5
printf %s "checking whether to enable tokenizer support... " >&6; }
# Check whether --enable-tokenizer was given.
if test ${enable_tokenizer+y}
then :
  enableval=$enable_tokenizer; PHP_TOKENIZER=$enableval
else case e in #(
  e)
  PHP_TOKENIZER=yes
  test "$PHP_ENABLE_ALL" && PHP_TOKENIZER=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_TOKENIZER in
shared,*)
  PHP_TOKENIZER=$(echo "$PHP_TOKENIZER"|$SED 's/^shared,//')
  ;;
shared)
  PHP_TOKENIZER=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_TOKENIZER" != "no"; then

  ext_builddir=ext/tokenizer
  ext_srcdir=$abs_srcdir/ext/tokenizer
  ext_dir=ext/tokenizer

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_TOKENIZER_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in tokenizer.c tokenizer_data.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC tokenizer;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC tokenizer;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_TOKENIZER_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in tokenizer.c tokenizer_data.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_tokenizer="$shared_objects_tokenizer $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/tokenizer.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/tokenizer.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_tokenizer"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/tokenizer.$suffix: $ext_builddir/tokenizer.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/tokenizer.$suffix \$(phplibdir)

$ext_builddir/tokenizer.$suffix: \$(shared_objects_tokenizer) \$(TOKENIZER_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_tokenizer) \$(TOKENIZER_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_TOKENIZER 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_TOKENIZER_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in tokenizer.c tokenizer_data.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC tokenizer;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in tokenizer.c tokenizer_data.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC tokenizer;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=tokenizer

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

    src=$ext_srcdir/Makefile.frag
  ac_srcdir=$ext_srcdir
  ac_builddir=$ext_builddir
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

fi






php_with_external_uriparser=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external/system liburiparser" >&5
printf %s "checking for external/system liburiparser... " >&6; }

# Check whether --with-external-uriparser was given.
if test ${with_external_uriparser+y}
then :
  withval=$with_external_uriparser; PHP_EXTERNAL_URIPARSER=$withval
else case e in #(
  e)
  PHP_EXTERNAL_URIPARSER=no

 ;;
esac
fi


ext_output=$PHP_EXTERNAL_URIPARSER
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





    header_path=ext/uri
    for header_file in php_uri.h php_uri_common.h uri_parser_rfc3986.h uri_parser_whatwg.h uri_parser_php_parse_url.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done





printf "%s\n" "#define URI_ENABLE_ANSI 1" >>confdefs.h


printf "%s\n" "#define URI_NO_UNICODE 1" >>confdefs.h


if test "$PHP_EXTERNAL_URIPARSER" = "no"; then
  URIPARSER_DIR="uriparser"
  URIPARSER_SOURCES="$URIPARSER_DIR/src/UriCommon.c $URIPARSER_DIR/src/UriCompare.c $URIPARSER_DIR/src/UriCopy.c \
  $URIPARSER_DIR/src/UriEscape.c $URIPARSER_DIR/src/UriFile.c $URIPARSER_DIR/src/UriIp4.c $URIPARSER_DIR/src/UriIp4Base.c \
  $URIPARSER_DIR/src/UriMemory.c $URIPARSER_DIR/src/UriNormalize.c $URIPARSER_DIR/src/UriNormalizeBase.c \
  $URIPARSER_DIR/src/UriParse.c $URIPARSER_DIR/src/UriParseBase.c $URIPARSER_DIR/src/UriQuery.c \
  $URIPARSER_DIR/src/UriRecompose.c $URIPARSER_DIR/src/UriResolve.c $URIPARSER_DIR/src/UriSetFragment.c \
  $URIPARSER_DIR/src/UriSetHostAuto.c $URIPARSER_DIR/src/UriSetHostCommon.c $URIPARSER_DIR/src/UriSetHostIp4.c \
  $URIPARSER_DIR/src/UriSetHostIp6.c $URIPARSER_DIR/src/UriSetHostIpFuture.c $URIPARSER_DIR/src/UriSetHostRegName.c \
  $URIPARSER_DIR/src/UriSetPath.c $URIPARSER_DIR/src/UriSetPort.c $URIPARSER_DIR/src/UriSetQuery.c \
  $URIPARSER_DIR/src/UriSetScheme.c $URIPARSER_DIR/src/UriSetUserInfo.c $URIPARSER_DIR/src/UriShorten.c $URIPARSER_DIR/src/UriVersion.c"
  URI_CFLAGS="-DURI_STATIC_BUILD"
else

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for liburiparser >= 1.0.0" >&5
printf %s "checking for liburiparser >= 1.0.0... " >&6; }

if test -n "$LIBURIPARSER_CFLAGS"; then
    pkg_cv_LIBURIPARSER_CFLAGS="$LIBURIPARSER_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liburiparser >= 1.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "liburiparser >= 1.0.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBURIPARSER_CFLAGS=`$PKG_CONFIG --cflags "liburiparser >= 1.0.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBURIPARSER_LIBS"; then
    pkg_cv_LIBURIPARSER_LIBS="$LIBURIPARSER_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liburiparser >= 1.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "liburiparser >= 1.0.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBURIPARSER_LIBS=`$PKG_CONFIG --libs "liburiparser >= 1.0.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBURIPARSER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liburiparser >= 1.0.0" 2>&1`
        else
	        LIBURIPARSER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liburiparser >= 1.0.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBURIPARSER_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (liburiparser >= 1.0.0) were not met:

$LIBURIPARSER_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBURIPARSER_CFLAGS
and LIBURIPARSER_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBURIPARSER_CFLAGS
and LIBURIPARSER_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBURIPARSER_CFLAGS=$pkg_cv_LIBURIPARSER_CFLAGS
	LIBURIPARSER_LIBS=$pkg_cv_LIBURIPARSER_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $LIBURIPARSER_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ="$ -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi





  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi



  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $LIBURIPARSER_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done

fi


  ext_builddir=ext/uri
  ext_srcdir=$abs_srcdir/ext/uri
  ext_dir=ext/uri

  ac_extra=$(echo "$URI_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "no" != "shared" && test "no" != "yes" && test "" != "cli"; then
    PHP_URI_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_uri.c php_uri_common.c uri_parser_rfc3986.c uri_parser_whatwg.c uri_parser_php_parse_url.c $URIPARSER_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC uri;$ext_dir"
    if test "no" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC uri;$ext_dir"
    fi
  else
    if test "no" = "shared" || test "no" = "yes"; then
      PHP_URI_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_uri.c php_uri_common.c uri_parser_rfc3986.c uri_parser_whatwg.c uri_parser_php_parse_url.c $URIPARSER_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_uri="$shared_objects_uri $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/uri.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/uri.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_uri"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/uri.$suffix: $ext_builddir/uri.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/uri.$suffix \$(phplibdir)

$ext_builddir/uri.$suffix: \$(shared_objects_uri) \$(URI_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_uri) \$(URI_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_URI 1" >>confdefs.h

    fi
  fi

  if test "no" != "shared" && test "no" != "yes" && test "" = "cli"; then
    PHP_URI_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_uri.c php_uri_common.c uri_parser_rfc3986.c uri_parser_whatwg.c uri_parser_php_parse_url.c $URIPARSER_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC uri;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_uri.c php_uri_common.c uri_parser_rfc3986.c uri_parser_whatwg.c uri_parser_php_parse_url.c $URIPARSER_SOURCES; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC uri;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=uri

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_URI_SHARED
  is_it_shared=$PHP_LEXBOR_SHARED
  is_it_enabled=$PHP_LEXBOR
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension uri to build statically, but it
depends on extension lexbor, which you've configured to build shared.
You either need to build uri shared or build lexbor statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension uri, which depends on extension lexbor,
but you've either not enabled lexbor, or have disabled it.
" "$LINENO" 5
  fi


if test "$PHP_EXTERNAL_URIPARSER" = "no"; then
  as_fn_append BUILD_DIR " $ext_builddir/$URIPARSER_DIR/src $ext_builddir/$URIPARSER_DIR/include"


for include_path in $ext_srcdir/$URIPARSER_DIR/include; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

fi





php_enable_xml=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable XML support" >&5
printf %s "checking whether to enable XML support... " >&6; }
# Check whether --enable-xml was given.
if test ${enable_xml+y}
then :
  enableval=$enable_xml; PHP_XML=$enableval
else case e in #(
  e)
  PHP_XML=yes
  test "$PHP_ENABLE_ALL" && PHP_XML=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_XML in
shared,*)
  PHP_XML=$(echo "$PHP_XML"|$SED 's/^shared,//')
  ;;
shared)
  PHP_XML=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_with_expat=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with Expat support" >&5
printf %s "checking whether to build with Expat support... " >&6; }

# Check whether --with-expat was given.
if test ${with_expat+y}
then :
  withval=$with_expat; PHP_EXPAT=$withval
else case e in #(
  e)
  PHP_EXPAT=no

 ;;
esac
fi


ext_output=$PHP_EXPAT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_XML" != "no"; then
    if test "x$PHP_EXPAT" = xno
then :


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.9.4" >&5
printf %s "checking for libxml-2.0 >= 2.9.4... " >&6; }

if test -n "$LIBXML_CFLAGS"; then
    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBXML_LIBS"; then
    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        else
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBXML_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libxml-2.0 >= 2.9.4) were not met:

$LIBXML_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $LIBXML_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBXML_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  XML_SHARED_LIBADD="$XML_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        XML_SHARED_LIBADD="$XML_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        XML_SHARED_LIBADD="-L$ai_p $XML_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && XML_SHARED_LIBADD="$ld_runpath_switch$ai_p $XML_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  xml_extra_sources="compat.c"

else case e in #(
  e)

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for expat" >&5
printf %s "checking for expat... " >&6; }

if test -n "$EXPAT_CFLAGS"; then
    pkg_cv_EXPAT_CFLAGS="$EXPAT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"expat\""; } >&5
  ($PKG_CONFIG --exists --print-errors "expat") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_EXPAT_CFLAGS=`$PKG_CONFIG --cflags "expat" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$EXPAT_LIBS"; then
    pkg_cv_EXPAT_LIBS="$EXPAT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"expat\""; } >&5
  ($PKG_CONFIG --exists --print-errors "expat") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_EXPAT_LIBS=`$PKG_CONFIG --libs "expat" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        EXPAT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "expat" 2>&1`
        else
	        EXPAT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "expat" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$EXPAT_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (expat) were not met:

$EXPAT_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables EXPAT_CFLAGS
and EXPAT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables EXPAT_CFLAGS
and EXPAT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	EXPAT_CFLAGS=$pkg_cv_EXPAT_CFLAGS
	EXPAT_LIBS=$pkg_cv_EXPAT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $EXPAT_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $EXPAT_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  XML_SHARED_LIBADD="$XML_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        XML_SHARED_LIBADD="$XML_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        XML_SHARED_LIBADD="-L$ai_p $XML_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && XML_SHARED_LIBADD="$ld_runpath_switch$ai_p $XML_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


printf "%s\n" "#define HAVE_LIBEXPAT 1" >>confdefs.h

 ;;
esac
fi


  ext_builddir=ext/xml
  ext_srcdir=$abs_srcdir/ext/xml
  ext_dir=ext/xml

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_XML_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in xml.c $xml_extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC xml;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC xml;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_XML_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in xml.c $xml_extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_xml="$shared_objects_xml $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xml.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xml.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xml"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/xml.$suffix: $ext_builddir/xml.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/xml.$suffix \$(phplibdir)

$ext_builddir/xml.$suffix: \$(shared_objects_xml) \$(XML_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_xml) \$(XML_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_XML 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_XML_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in xml.c $xml_extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC xml;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in xml.c $xml_extra_sources; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC xml;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=xml

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  if test "x$PHP_EXPAT" = xno
then :


  am_i_shared=$PHP_XML_SHARED
  is_it_shared=$PHP_LIBXML_SHARED
  is_it_enabled=$PHP_LIBXML
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension xml to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build xml shared or build libxml statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension xml, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
  fi


fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST XML_SHARED_LIBADD"


    header_path=ext/xml
    for header_file in expat_compat.h php_xml.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done



printf "%s\n" "#define HAVE_XML 1" >>confdefs.h

fi





php_enable_xmlreader=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable XMLReader support" >&5
printf %s "checking whether to enable XMLReader support... " >&6; }
# Check whether --enable-xmlreader was given.
if test ${enable_xmlreader+y}
then :
  enableval=$enable_xmlreader; PHP_XMLREADER=$enableval
else case e in #(
  e)
  PHP_XMLREADER=yes
  test "$PHP_ENABLE_ALL" && PHP_XMLREADER=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_XMLREADER in
shared,*)
  PHP_XMLREADER=$(echo "$PHP_XMLREADER"|$SED 's/^shared,//')
  ;;
shared)
  PHP_XMLREADER=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_XMLREADER" != "no"; then


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.9.4" >&5
printf %s "checking for libxml-2.0 >= 2.9.4... " >&6; }

if test -n "$LIBXML_CFLAGS"; then
    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBXML_LIBS"; then
    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        else
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBXML_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libxml-2.0 >= 2.9.4) were not met:

$LIBXML_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $LIBXML_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBXML_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  XMLREADER_SHARED_LIBADD="$XMLREADER_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        XMLREADER_SHARED_LIBADD="$XMLREADER_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        XMLREADER_SHARED_LIBADD="-L$ai_p $XMLREADER_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && XMLREADER_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLREADER_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_XMLREADER 1" >>confdefs.h


  ext_builddir=ext/xmlreader
  ext_srcdir=$abs_srcdir/ext/xmlreader
  ext_dir=ext/xmlreader

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_XMLREADER_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xmlreader.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC xmlreader;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlreader;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_XMLREADER_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_xmlreader.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_xmlreader="$shared_objects_xmlreader $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlreader.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlreader.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlreader"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/xmlreader.$suffix: $ext_builddir/xmlreader.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/xmlreader.$suffix \$(phplibdir)

$ext_builddir/xmlreader.$suffix: \$(shared_objects_xmlreader) \$(XMLREADER_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_xmlreader) \$(XMLREADER_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_XMLREADER 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_XMLREADER_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xmlreader.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC xmlreader;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xmlreader.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlreader;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=xmlreader

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_XMLREADER_SHARED
  is_it_shared=$PHP_DOM_SHARED
  is_it_enabled=$PHP_DOM
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension xmlreader to build statically, but it
depends on extension dom, which you've configured to build shared.
You either need to build xmlreader shared or build dom statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
    as_fn_error $? "
You've configured extension xmlreader, which depends on extension dom,
but you've either not enabled dom, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_XMLREADER_SHARED
  is_it_shared=$PHP_LIBXML_SHARED
  is_it_enabled=$PHP_LIBXML
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension xmlreader to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build xmlreader shared or build libxml statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension xmlreader, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLREADER_SHARED_LIBADD"



fi





php_enable_xmlwriter=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable XMLWriter support" >&5
printf %s "checking whether to enable XMLWriter support... " >&6; }
# Check whether --enable-xmlwriter was given.
if test ${enable_xmlwriter+y}
then :
  enableval=$enable_xmlwriter; PHP_XMLWRITER=$enableval
else case e in #(
  e)
  PHP_XMLWRITER=yes
  test "$PHP_ENABLE_ALL" && PHP_XMLWRITER=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_XMLWRITER in
shared,*)
  PHP_XMLWRITER=$(echo "$PHP_XMLWRITER"|$SED 's/^shared,//')
  ;;
shared)
  PHP_XMLWRITER=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_XMLWRITER" != "no"; then


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.9.4" >&5
printf %s "checking for libxml-2.0 >= 2.9.4... " >&6; }

if test -n "$LIBXML_CFLAGS"; then
    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBXML_LIBS"; then
    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.9.4\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.9.4") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.9.4" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        else
	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.9.4" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBXML_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libxml-2.0 >= 2.9.4) were not met:

$LIBXML_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi

  for ac_i in $LIBXML_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBXML_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  XMLWRITER_SHARED_LIBADD="$XMLWRITER_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        XMLWRITER_SHARED_LIBADD="$XMLWRITER_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        XMLWRITER_SHARED_LIBADD="-L$ai_p $XMLWRITER_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && XMLWRITER_SHARED_LIBADD="$ld_runpath_switch$ai_p $XMLWRITER_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



printf "%s\n" "#define HAVE_XMLWRITER 1" >>confdefs.h


  ext_builddir=ext/xmlwriter
  ext_srcdir=$abs_srcdir/ext/xmlwriter
  ext_dir=ext/xmlwriter

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_XMLWRITER_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xmlwriter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC xmlwriter;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC xmlwriter;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_XMLWRITER_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_xmlwriter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_xmlwriter="$shared_objects_xmlwriter $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xmlwriter.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xmlwriter.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xmlwriter"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/xmlwriter.$suffix: $ext_builddir/xmlwriter.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/xmlwriter.$suffix \$(phplibdir)

$ext_builddir/xmlwriter.$suffix: \$(shared_objects_xmlwriter) \$(XMLWRITER_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_xmlwriter) \$(XMLWRITER_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_XMLWRITER 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_XMLWRITER_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xmlwriter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC xmlwriter;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xmlwriter.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC xmlwriter;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=xmlwriter

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_XMLWRITER_SHARED
  is_it_shared=$PHP_LIBXML_SHARED
  is_it_enabled=$PHP_LIBXML
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension xmlwriter to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build xmlwriter shared or build libxml statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension xmlwriter, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST XMLWRITER_SHARED_LIBADD"



fi





php_with_xsl=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with XSL support" >&5
printf %s "checking whether to build with XSL support... " >&6; }

# Check whether --with-xsl was given.
if test ${with_xsl+y}
then :
  withval=$with_xsl; PHP_XSL=$withval
else case e in #(
  e)
  PHP_XSL=no
  test "$PHP_ENABLE_ALL" && PHP_XSL=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_XSL in
shared,*)
  PHP_XSL=$(echo "$PHP_XSL"|$SED 's/^shared,//')
  ;;
shared)
  PHP_XSL=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_XSL" != "no"; then

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxslt >= 1.1.0" >&5
printf %s "checking for libxslt >= 1.1.0... " >&6; }

if test -n "$XSL_CFLAGS"; then
    pkg_cv_XSL_CFLAGS="$XSL_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxslt >= 1.1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxslt >= 1.1.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XSL_CFLAGS=`$PKG_CONFIG --cflags "libxslt >= 1.1.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$XSL_LIBS"; then
    pkg_cv_XSL_LIBS="$XSL_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxslt >= 1.1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxslt >= 1.1.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XSL_LIBS=`$PKG_CONFIG --libs "libxslt >= 1.1.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        XSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxslt >= 1.1.0" 2>&1`
        else
	        XSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxslt >= 1.1.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$XSL_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libxslt >= 1.1.0) were not met:

$XSL_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables XSL_CFLAGS
and XSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables XSL_CFLAGS
and XSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	XSL_CFLAGS=$pkg_cv_XSL_CFLAGS
	XSL_LIBS=$pkg_cv_XSL_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


  for ac_i in $XSL_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $XSL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        XSL_SHARED_LIBADD="-L$ai_p $XSL_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && XSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $XSL_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexslt" >&5
printf %s "checking for libexslt... " >&6; }

if test -n "$EXSLT_CFLAGS"; then
    pkg_cv_EXSLT_CFLAGS="$EXSLT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libexslt\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libexslt") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_EXSLT_CFLAGS=`$PKG_CONFIG --cflags "libexslt" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$EXSLT_LIBS"; then
    pkg_cv_EXSLT_LIBS="$EXSLT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libexslt\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libexslt") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_EXSLT_LIBS=`$PKG_CONFIG --libs "libexslt" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        EXSLT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libexslt" 2>&1`
        else
	        EXSLT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libexslt" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$EXSLT_PKG_ERRORS" >&5

	:
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	:
else
	EXSLT_CFLAGS=$pkg_cv_EXSLT_CFLAGS
	EXSLT_LIBS=$pkg_cv_EXSLT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }


  for ac_i in $EXSLT_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $EXSLT_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        XSL_SHARED_LIBADD="$XSL_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        XSL_SHARED_LIBADD="-L$ai_p $XSL_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && XSL_SHARED_LIBADD="$ld_runpath_switch$ai_p $XSL_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


printf "%s\n" "#define HAVE_XSL_EXSLT 1" >>confdefs.h


fi


printf "%s\n" "#define HAVE_XSL 1" >>confdefs.h


  ext_builddir=ext/xsl
  ext_srcdir=$abs_srcdir/ext/xsl
  ext_dir=ext/xsl

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_XSL_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xsl.c xsltprocessor.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC xsl;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC xsl;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_XSL_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_xsl.c xsltprocessor.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_xsl="$shared_objects_xsl $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/xsl.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/xsl.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_xsl"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/xsl.$suffix: $ext_builddir/xsl.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/xsl.$suffix \$(phplibdir)

$ext_builddir/xsl.$suffix: \$(shared_objects_xsl) \$(XSL_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_xsl) \$(XSL_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_XSL 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_XSL_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xsl.c xsltprocessor.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC xsl;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_xsl.c xsltprocessor.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC xsl;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=xsl

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST XSL_SHARED_LIBADD"


  am_i_shared=$PHP_XSL_SHARED
  is_it_shared=$PHP_LIBXML_SHARED
  is_it_enabled=$PHP_LIBXML
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension xsl to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build xsl shared or build libxml statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension xsl, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
  fi


  am_i_shared=$PHP_XSL_SHARED
  is_it_shared=$PHP_DOM_SHARED
  is_it_enabled=$PHP_DOM
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension xsl to build statically, but it
depends on extension dom, which you've configured to build shared.
You either need to build xsl shared or build dom statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension xsl, which depends on extension dom,
but you've either not enabled dom, or have disabled it.
" "$LINENO" 5
  fi

fi





php_enable_zend_test=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable zend_test extension" >&5
printf %s "checking whether to enable zend_test extension... " >&6; }
# Check whether --enable-zend-test was given.
if test ${enable_zend_test+y}
then :
  enableval=$enable_zend_test; PHP_ZEND_TEST=$enableval
else case e in #(
  e)
  PHP_ZEND_TEST=no
  test "$PHP_ENABLE_ALL" && PHP_ZEND_TEST=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_ZEND_TEST in
shared,*)
  PHP_ZEND_TEST=$(echo "$PHP_ZEND_TEST"|$SED 's/^shared,//')
  ;;
shared)
  PHP_ZEND_TEST=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_ZEND_TEST" != "no"; then

  ext_builddir=ext/zend_test
  ext_srcdir=$abs_srcdir/ext/zend_test
  ext_dir=ext/zend_test

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_ZEND_TEST_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fiber.c iterators.c object_handlers.c observer.c test.c zend_mm_custom_handlers.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC zend_test;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC zend_test;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_ZEND_TEST_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in fiber.c iterators.c object_handlers.c observer.c test.c zend_mm_custom_handlers.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_zend_test="$shared_objects_zend_test $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/zend_test.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/zend_test.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_zend_test"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/zend_test.$suffix: $ext_builddir/zend_test.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/zend_test.$suffix \$(phplibdir)

$ext_builddir/zend_test.$suffix: \$(shared_objects_zend_test) \$(ZEND_TEST_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_zend_test) \$(ZEND_TEST_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_ZEND_TEST 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_ZEND_TEST_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fiber.c iterators.c object_handlers.c observer.c test.c zend_mm_custom_handlers.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC zend_test;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fiber.c iterators.c object_handlers.c observer.c test.c zend_mm_custom_handlers.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC zend_test;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=zend_test

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi

fi





php_with_zip=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip archive read/write support" >&5
printf %s "checking for zip archive read/write support... " >&6; }

# Check whether --with-zip was given.
if test ${with_zip+y}
then :
  withval=$with_zip; PHP_ZIP=$withval
else case e in #(
  e)
  PHP_ZIP=no
  test "$PHP_ENABLE_ALL" && PHP_ZIP=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_ZIP in
shared,*)
  PHP_ZIP=$(echo "$PHP_ZIP"|$SED 's/^shared,//')
  ;;
shared)
  PHP_ZIP=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_ZIP" != "no"; then

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0" >&5
printf %s "checking for libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0... " >&6; }

if test -n "$LIBZIP_CFLAGS"; then
    pkg_cv_LIBZIP_CFLAGS="$LIBZIP_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBZIP_CFLAGS=`$PKG_CONFIG --cflags "libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBZIP_LIBS"; then
    pkg_cv_LIBZIP_LIBS="$LIBZIP_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBZIP_LIBS=`$PKG_CONFIG --libs "libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBZIP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0" 2>&1`
        else
	        LIBZIP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBZIP_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met:

$LIBZIP_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBZIP_CFLAGS
and LIBZIP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBZIP_CFLAGS
and LIBZIP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	LIBZIP_CFLAGS=$pkg_cv_LIBZIP_CFLAGS
	LIBZIP_LIBS=$pkg_cv_LIBZIP_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

fi


  for ac_i in $LIBZIP_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $LIBZIP_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  ZIP_SHARED_LIBADD="$ZIP_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        ZIP_SHARED_LIBADD="$ZIP_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        ZIP_SHARED_LIBADD="-L$ai_p $ZIP_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && ZIP_SHARED_LIBADD="$ld_runpath_switch$ai_p $ZIP_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$LIBZIP_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip_file_set_mtime in -lzip" >&5
printf %s "checking for zip_file_set_mtime in -lzip... " >&6; }
if test ${ac_cv_lib_zip_zip_file_set_mtime+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lzip  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char zip_file_set_mtime (void);
int
main (void)
{
return zip_file_set_mtime ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_zip_zip_file_set_mtime=yes
else case e in #(
  e) ac_cv_lib_zip_zip_file_set_mtime=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zip_zip_file_set_mtime" >&5
printf "%s\n" "$ac_cv_lib_zip_zip_file_set_mtime" >&6; }
if test "x$ac_cv_lib_zip_zip_file_set_mtime" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_SET_MTIME 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_zip_zip_file_set_mtime
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libzip >= 1.0.0 needed for setting mtime" >&5
printf "%s\n" "$as_me: WARNING: Libzip >= 1.0.0 needed for setting mtime" >&2;}
   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$LIBZIP_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip_file_set_encryption in -lzip" >&5
printf %s "checking for zip_file_set_encryption in -lzip... " >&6; }
if test ${ac_cv_lib_zip_zip_file_set_encryption+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lzip  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char zip_file_set_encryption (void);
int
main (void)
{
return zip_file_set_encryption ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_zip_zip_file_set_encryption=yes
else case e in #(
  e) ac_cv_lib_zip_zip_file_set_encryption=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zip_zip_file_set_encryption" >&5
printf "%s\n" "$ac_cv_lib_zip_zip_file_set_encryption" >&6; }
if test "x$ac_cv_lib_zip_zip_file_set_encryption" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_ENCRYPTION 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_zip_zip_file_set_encryption
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libzip >= 1.2.0 needed for encryption support" >&5
printf "%s\n" "$as_me: WARNING: Libzip >= 1.2.0 needed for encryption support" >&2;}
   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$LIBZIP_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip_libzip_version in -lzip" >&5
printf %s "checking for zip_libzip_version in -lzip... " >&6; }
if test ${ac_cv_lib_zip_zip_libzip_version+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lzip  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char zip_libzip_version (void);
int
main (void)
{
return zip_libzip_version ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_zip_zip_libzip_version=yes
else case e in #(
  e) ac_cv_lib_zip_zip_libzip_version=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zip_zip_libzip_version" >&5
printf "%s\n" "$ac_cv_lib_zip_zip_libzip_version" >&6; }
if test "x$ac_cv_lib_zip_zip_libzip_version" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_LIBZIP_VERSION 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_zip_zip_libzip_version

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$LIBZIP_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip_register_progress_callback_with_state in -lzip" >&5
printf %s "checking for zip_register_progress_callback_with_state in -lzip... " >&6; }
if test ${ac_cv_lib_zip_zip_register_progress_callback_with_state+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lzip  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char zip_register_progress_callback_with_state (void);
int
main (void)
{
return zip_register_progress_callback_with_state ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_zip_zip_register_progress_callback_with_state=yes
else case e in #(
  e) ac_cv_lib_zip_zip_register_progress_callback_with_state=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zip_zip_register_progress_callback_with_state" >&5
printf "%s\n" "$ac_cv_lib_zip_zip_register_progress_callback_with_state" >&6; }
if test "x$ac_cv_lib_zip_zip_register_progress_callback_with_state" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_PROGRESS_CALLBACK 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_zip_zip_register_progress_callback_with_state

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$LIBZIP_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip_register_cancel_callback_with_state in -lzip" >&5
printf %s "checking for zip_register_cancel_callback_with_state in -lzip... " >&6; }
if test ${ac_cv_lib_zip_zip_register_cancel_callback_with_state+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lzip  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char zip_register_cancel_callback_with_state (void);
int
main (void)
{
return zip_register_cancel_callback_with_state ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_zip_zip_register_cancel_callback_with_state=yes
else case e in #(
  e) ac_cv_lib_zip_zip_register_cancel_callback_with_state=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zip_zip_register_cancel_callback_with_state" >&5
printf "%s\n" "$ac_cv_lib_zip_zip_register_cancel_callback_with_state" >&6; }
if test "x$ac_cv_lib_zip_zip_register_cancel_callback_with_state" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_CANCEL_CALLBACK 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_zip_zip_register_cancel_callback_with_state

   ;;
esac
fi



  save_old_LDFLAGS=$LDFLAGS
  ac_stuff="$LIBZIP_LIBS"

  save_ext_shared=$ext_shared
  ext_shared=yes

  for ac_i in $ac_stuff; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  LDFLAGS="$LDFLAGS -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        LDFLAGS="$LDFLAGS -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        LDFLAGS="-L$ai_p $LDFLAGS"
        test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip_compression_method_supported in -lzip" >&5
printf %s "checking for zip_compression_method_supported in -lzip... " >&6; }
if test ${ac_cv_lib_zip_zip_compression_method_supported+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lzip  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char zip_compression_method_supported (void);
int
main (void)
{
return zip_compression_method_supported ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_zip_zip_compression_method_supported=yes
else case e in #(
  e) ac_cv_lib_zip_zip_compression_method_supported=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zip_zip_compression_method_supported" >&5
printf "%s\n" "$ac_cv_lib_zip_zip_compression_method_supported" >&6; }
if test "x$ac_cv_lib_zip_zip_compression_method_supported" = xyes
then :

    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared

printf "%s\n" "#define HAVE_METHOD_SUPPORTED 1" >>confdefs.h


else case e in #(
  e)
    LDFLAGS=$save_old_LDFLAGS
    ext_shared=$save_ext_shared
    unset ac_cv_lib_zip_zip_compression_method_supported

   ;;
esac
fi



printf "%s\n" "#define HAVE_ZIP 1" >>confdefs.h



  ext_builddir=ext/zip
  ext_srcdir=$abs_srcdir/ext/zip
  ext_dir=ext/zip

  ac_extra=

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_ZIP_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_zip.c zip_stream.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC zip;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC zip;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_ZIP_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in php_zip.c zip_stream.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_zip="$shared_objects_zip $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/zip.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/zip.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_zip"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/zip.$suffix: $ext_builddir/zip.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/zip.$suffix \$(phplibdir)

$ext_builddir/zip.$suffix: \$(shared_objects_zip) \$(ZIP_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_zip) \$(ZIP_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_ZIP 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_ZIP_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_zip.c zip_stream.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC zip;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in php_zip.c zip_stream.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC zip;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=zip

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  am_i_shared=$PHP_ZIP_SHARED
  is_it_shared=$PHP_PCRE_SHARED
  is_it_enabled=$PHP_PCRE
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension zip to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build zip shared or build pcre statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension zip, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
  fi



  PHP_VAR_SUBST="$PHP_VAR_SUBST ZIP_SHARED_LIBADD"

fi





php_enable_mysqlnd=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable mysqlnd" >&5
printf %s "checking whether to enable mysqlnd... " >&6; }
# Check whether --enable-mysqlnd was given.
if test ${enable_mysqlnd+y}
then :
  enableval=$enable_mysqlnd; PHP_MYSQLND=$enableval
else case e in #(
  e)
  PHP_MYSQLND=no
  test "$PHP_ENABLE_ALL" && PHP_MYSQLND=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_MYSQLND in
shared,*)
  PHP_MYSQLND=$(echo "$PHP_MYSQLND"|$SED 's/^shared,//')
  ;;
shared)
  PHP_MYSQLND=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if ${PHP_OPENSSL:+false} :
then :
  PHP_OPENSSL=no
fi


php_with_mysqlnd_ssl=$PHP_OPENSSL

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable extended SSL support in mysqlnd" >&5
printf %s "checking whether to enable extended SSL support in mysqlnd... " >&6; }

# Check whether --with-mysqlnd-ssl was given.
if test ${with_mysqlnd_ssl+y}
then :
  withval=$with_mysqlnd_ssl; PHP_MYSQLND_SSL=$withval
else case e in #(
  e)
  PHP_MYSQLND_SSL=$PHP_OPENSSL

 ;;
esac
fi


ext_output=$PHP_MYSQLND_SSL
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }





php_enable_mysqlnd_compression_support=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable compressed protocol support in mysqlnd" >&5
printf %s "checking whether to enable compressed protocol support in mysqlnd... " >&6; }
# Check whether --enable-mysqlnd-compression-support was given.
if test ${enable_mysqlnd_compression_support+y}
then :
  enableval=$enable_mysqlnd_compression_support; PHP_MYSQLND_COMPRESSION_SUPPORT=$enableval
else case e in #(
  e)
  PHP_MYSQLND_COMPRESSION_SUPPORT=yes

 ;;
esac
fi


ext_output=$PHP_MYSQLND_COMPRESSION_SUPPORT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
  if test "x$PHP_MYSQLND_COMPRESSION_SUPPORT" = xno
then :

else case e in #(
  e)
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.11" >&5
printf %s "checking for zlib >= 1.2.11... " >&6; }

if test -n "$ZLIB_CFLAGS"; then
    pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
  ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.11" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ZLIB_LIBS"; then
    pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
  ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.11" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
        else
	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ZLIB_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (zlib >= 1.2.11) were not met:

$ZLIB_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ZLIB_CFLAGS
and ZLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables ZLIB_CFLAGS
and ZLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
	ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

  for ac_i in $ZLIB_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done


  for ac_i in $ZLIB_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  MYSQLND_SHARED_LIBADD="$MYSQLND_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        MYSQLND_SHARED_LIBADD="$MYSQLND_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        MYSQLND_SHARED_LIBADD="-L$ai_p $MYSQLND_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && MYSQLND_SHARED_LIBADD="$ld_runpath_switch$ai_p $MYSQLND_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


printf "%s\n" "#define MYSQLND_COMPRESSION_ENABLED 1" >>confdefs.h

fi ;;
esac
fi


printf "%s\n" "#define MYSQLND_SSL_SUPPORTED 1" >>confdefs.h



  ext_builddir=ext/mysqlnd
  ext_srcdir=$abs_srcdir/ext/mysqlnd
  ext_dir=ext/mysqlnd

  ac_extra=$(echo "-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g)

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
    PHP_MYSQLND_SHARED=no


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mysqlnd_alloc.c mysqlnd_auth.c mysqlnd_block_alloc.c mysqlnd_charset.c mysqlnd_commands.c mysqlnd_connection.c mysqlnd_debug.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_loaddata.c mysqlnd_plugin.c mysqlnd_protocol_frame_codec.c mysqlnd_ps_codec.c mysqlnd_ps.c mysqlnd_read_buffer.c mysqlnd_result_meta.c mysqlnd_result.c mysqlnd_reverse_api.c mysqlnd_statistics.c mysqlnd_vio.c mysqlnd_wireprotocol.c php_mysqlnd.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


    EXT_STATIC="$EXT_STATIC mysqlnd;$ext_dir"
    if test "$ext_shared" != "nocli"; then
      EXT_CLI_STATIC="$EXT_CLI_STATIC mysqlnd;$ext_dir"
    fi
  else
    if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
      PHP_MYSQLND_SHARED=yes

  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$shared_c_pre
  b_cxx_pre=$shared_cxx_pre
  b_c_meta=$shared_c_meta
  b_cxx_meta=$shared_cxx_meta
  b_c_post=$shared_c_post
  b_cxx_post=$shared_cxx_post
  b_lo=$shared_lo


  old_IFS=$IFS
  for ac_src in mysqlnd_alloc.c mysqlnd_auth.c mysqlnd_block_alloc.c mysqlnd_charset.c mysqlnd_commands.c mysqlnd_connection.c mysqlnd_debug.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_loaddata.c mysqlnd_plugin.c mysqlnd_protocol_frame_codec.c mysqlnd_ps_codec.c mysqlnd_ps.c mysqlnd_read_buffer.c mysqlnd_result_meta.c mysqlnd_result.c mysqlnd_reverse_api.c mysqlnd_statistics.c mysqlnd_vio.c mysqlnd_wireprotocol.c php_mysqlnd.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      shared_objects_mysqlnd="$shared_objects_mysqlnd $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -DZEND_COMPILE_DL_EXT=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  install_modules="install-modules"
  suffix=la

  case $host_alias in #(
  *aix*) :
    additional_flags="-Wl,-G" ;; #(
  *) :
     ;;
esac

  if test "x" = "xyes"; then
    PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/mysqlnd.$suffix"
  else
    PHP_MODULES="$PHP_MODULES \$(phplibdir)/mysqlnd.$suffix"
  fi

  PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_mysqlnd"

  cat >>Makefile.objects<<EOF
\$(phplibdir)/mysqlnd.$suffix: $ext_builddir/mysqlnd.$suffix
	\$(LIBTOOL) --tag=CC --mode=install cp $ext_builddir/mysqlnd.$suffix \$(phplibdir)

$ext_builddir/mysqlnd.$suffix: \$(shared_objects_mysqlnd) \$(MYSQLND_SHARED_DEPENDENCIES)
	\$(LIBTOOL) --tag=CC --mode=link \$(CC) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o \$@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$(shared_objects_mysqlnd) \$(MYSQLND_SHARED_LIBADD)

EOF


printf "%s\n" "#define COMPILE_DL_MYSQLND 1" >>confdefs.h

    fi
  fi

  if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
    PHP_MYSQLND_SHARED=no
    case "$PHP_SAPI" in
      cgi|embed|phpdbg)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mysqlnd_alloc.c mysqlnd_auth.c mysqlnd_block_alloc.c mysqlnd_charset.c mysqlnd_commands.c mysqlnd_connection.c mysqlnd_debug.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_loaddata.c mysqlnd_plugin.c mysqlnd_protocol_frame_codec.c mysqlnd_ps_codec.c mysqlnd_ps.c mysqlnd_read_buffer.c mysqlnd_result_meta.c mysqlnd_result.c mysqlnd_reverse_api.c mysqlnd_statistics.c mysqlnd_vio.c mysqlnd_wireprotocol.c php_mysqlnd.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        EXT_STATIC="$EXT_STATIC mysqlnd;$ext_dir"
        ;;
      *)


  case $ext_dir in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "$ext_dir"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/$ext_dir/"; ac_bdir="$ext_dir/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in mysqlnd_alloc.c mysqlnd_auth.c mysqlnd_block_alloc.c mysqlnd_charset.c mysqlnd_commands.c mysqlnd_connection.c mysqlnd_debug.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_loaddata.c mysqlnd_plugin.c mysqlnd_protocol_frame_codec.c mysqlnd_ps_codec.c mysqlnd_ps.c mysqlnd_read_buffer.c mysqlnd_result_meta.c mysqlnd_result.c mysqlnd_reverse_api.c mysqlnd_statistics.c mysqlnd_vio.c mysqlnd_wireprotocol.c php_mysqlnd.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $ac_extra -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


        ;;
    esac
    EXT_CLI_STATIC="$EXT_CLI_STATIC mysqlnd;$ext_dir"
  fi
  as_fn_append BUILD_DIR " $ext_builddir"


  if test "$ext_builddir" = "."; then
    PHP_PECL_EXTENSION=mysqlnd

  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"

  fi


  if test "x$PHP_MYSQLND_SSL" = xno
then :

else case e in #(
  e)
  found_openssl=no


pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl >= 1.1.1" >&5
printf %s "checking for openssl >= 1.1.1... " >&6; }

if test -n "$OPENSSL_CFLAGS"; then
    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl >= 1.1.1" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$OPENSSL_LIBS"; then
    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl >= 1.1.1" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
        else
	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$OPENSSL_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (openssl >= 1.1.1) were not met:

$OPENSSL_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	found_openssl=yes
fi

  if test "$found_openssl" = "yes"; then

  for ac_i in $OPENSSL_LIBS; do
    case $ac_i in #(
  -pthread) :

        if test "x$ext_shared" = xyes
then :
  MYSQLND_SHARED_LIBADD="$MYSQLND_SHARED_LIBADD -pthread"
else case e in #(
  e)


  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS$unique=set"
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
  fi



  unique=$(echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$EXTRA_LDFLAGS_PROGRAM$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "EXTRA_LDFLAGS_PROGRAM$unique=set"
    EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"
  fi

         ;;
esac
fi
       ;; #(
  -l*) :

        ac_ii=$(echo $ac_i|cut -c 3-)


  case $ac_ii in
  c|c_r) ;;
  *)
    if test "$ext_shared" = "yes"; then
        MYSQLND_SHARED_LIBADD="$MYSQLND_SHARED_LIBADD -l$ac_ii"
    else


  case $ac_ii in
  c|c_r) ;;
  *)
      LIBS="$LIBS -l$ac_ii"
   ;;
  esac


    fi
   ;;
  esac


       ;; #(
  -L*) :

        ac_ii=$(echo $ac_i|cut -c 3-)

  if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir=$(echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$ac_ii")
  fi


      if test "$ext_shared" = "yes"; then
        MYSQLND_SHARED_LIBADD="-L$ai_p $MYSQLND_SHARED_LIBADD"
        test -n "$ld_runpath_switch" && MYSQLND_SHARED_LIBADD="$ld_runpath_switch$ai_p $MYSQLND_SHARED_LIBADD"
      else



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "LIBPATH$unique=set"

    test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
    LDFLAGS="$LDFLAGS -L$ai_p"
    PHP_RPATHS="$PHP_RPATHS $ai_p"

  fi


      fi

  fi

       ;; #(
  *) :
     ;;
esac
  done


  for ac_i in $OPENSSL_CFLAGS; do
    case $ac_i in
    -I*)
      ac_ii=$(echo $ac_i|cut -c 3-)

for include_path in $ac_ii; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done

    ;;
    esac
  done



printf "%s\n" "#define MYSQLND_HAVE_SSL 1" >>confdefs.h


  am_i_shared=$PHP_MYSQLND_SHARED
  is_it_shared=$PHP_HASH_SHARED
  is_it_enabled=$PHP_HASH
  if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
    as_fn_error $? "
You've configured extension mysqlnd to build statically, but it
depends on extension hash, which you've configured to build shared.
You either need to build mysqlnd shared or build hash statically for the
build to be successful.
" "$LINENO" 5
  fi
  if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
    as_fn_error $? "
You've configured extension mysqlnd, which depends on extension hash,
but you've either not enabled hash, or have disabled it.
" "$LINENO" 5
  fi


  fi
 ;;
esac
fi


    for header_file in ext/mysqlnd/; do


  unique=$(echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
  fi

    done



  PHP_VAR_SUBST="$PHP_VAR_SUBST MYSQLND_SHARED_LIBADD"

fi




case $host_alias in #(
  i[3456]86-*-linux-* | x86_64-*-linux-*) :
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker support for -zcommon-page-size=2097152" >&5
printf %s "checking linker support for -zcommon-page-size=2097152... " >&6; }
if test ${php_cv_have_common_page_size+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
    save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152"
    if test "$cross_compiling" = yes
then :
  php_cv_have_common_page_size=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_have_common_page_size=yes
else case e in #(
  e) php_cv_have_common_page_size=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

    LDFLAGS=$save_LDFLAGS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_common_page_size" >&5
printf "%s\n" "$php_cv_have_common_page_size" >&6; }
  if test "x$php_cv_have_common_page_size" = xyes
then :
  EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152"
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker support for -zmax-page-size=2097152" >&5
printf %s "checking linker support for -zmax-page-size=2097152... " >&6; }
if test ${php_cv_have_max_page_size+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
      save_LDFLAGS=$LDFLAGS
      LDFLAGS="$LDFLAGS -Wl,-zmax-page-size=2097152"
      if test "$cross_compiling" = yes
then :
  php_cv_have_max_page_size=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_have_max_page_size=yes
else case e in #(
  e) php_cv_have_max_page_size=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

      LDFLAGS=$save_LDFLAGS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_max_page_size" >&5
printf "%s\n" "$php_cv_have_max_page_size" >&6; }
    if test "x$php_cv_have_max_page_size" = xyes
then :
  EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM -Wl,-zmax-page-size=2097152"
fi
   ;;
esac
fi
 ;; #(
  *) :
     ;;
esac

enable_shared=yes
enable_static=yes

case $php_sapi_module in
  shared)
    if test "$PHP_CGI" = "no" && test "$PHP_CLI" = "no" && test "$PHP_FPM" = "no" && test "$PHP_LITESPEED" = "no" && test "$PHP_PHPDBG" = "no"; then
      enable_static=no
    fi
    case $with_pic in
      yes)
        standard_libtool_flag='-prefer-pic'
        ;;
      no)
        standard_libtool_flag='-prefer-non-pic'
        ;;
    esac
    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
    ;;
  *)
    standard_libtool_flag='-prefer-non-pic -static'
    if test -z "$PHP_MODULES" && test -z "$PHP_ZEND_EX"; then
      enable_shared=no
    fi
    ;;
esac

EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
unset LIBS


# Check whether --enable- was given.
if test ${enable_+y}
then :
  enableval=$enable_;
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${T_MD}Configuring PEAR${T_ME}" >&5
printf "%s\n" "${T_MD}Configuring PEAR${T_ME}" >&6; }


if test "x$PHP_CLI" = xno
then :
  with_pear=no
fi


php_with_pear=no

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to install PEAR" >&5
printf %s "checking whether to install PEAR... " >&6; }

# Check whether --with-pear was given.
if test ${with_pear+y}
then :
  withval=$with_pear; PHP_PEAR=$withval
else case e in #(
  e)
  PHP_PEAR=no
  test "$PHP_ENABLE_ALL" && PHP_PEAR=$PHP_ENABLE_ALL
 ;;
esac
fi



ext_output="yes, shared"
ext_shared=yes
case $PHP_PEAR in
shared,*)
  PHP_PEAR=$(echo "$PHP_PEAR"|$SED 's/^shared,//')
  ;;
shared)
  PHP_PEAR=yes
  ;;
no)
  ext_output=no
  ext_shared=no
  ;;
*)
  ext_output=yes
  ext_shared=no
  ;;
esac



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
printf "%s\n" "$ext_output" >&6; }




if test "x$PHP_PEAR" = xno
then :

else case e in #(
  e)
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The --with-pear option is deprecated" >&5
printf "%s\n" "$as_me: WARNING: The --with-pear option is deprecated" >&2;}

    if test "x$PHP_XML" = xno
then :
  as_fn_error $? "PEAR requires XML to be enabled. Add '--enable-xml' to the configure line, or
disable PEAR (--without-pear)." "$LINENO" 5
fi

  install_pear=install-pear

  if test "x$PHP_PEAR" = xyes
then :
  case $PHP_LAYOUT in #(
  GNU) :
    PEAR_INSTALLDIR=$datadir/pear ;; #(
  *) :
    PEAR_INSTALLDIR=$libdir/php ;;
esac
else case e in #(
  e) PEAR_INSTALLDIR=$PHP_PEAR ;;
esac
fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST PEAR_INSTALLDIR"

  as_fn_append BUILD_DIR " pear"

    src=$abs_srcdir/pear/Makefile.frag
  ac_srcdir=$abs_srcdir/pear
  ac_builddir=pear
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

 ;;
esac
fi


# Check whether --enable- was given.
if test ${enable_+y}
then :
  enableval=$enable_;
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${T_MD}Configuring Zend${T_ME}" >&5
printf "%s\n" "${T_MD}Configuring Zend${T_ME}" >&6; }


# Check whether --enable-fiber-asm was given.
if test ${enable_fiber_asm+y}
then :
  enableval=$enable_fiber_asm; fiber_asm=$enableval
else case e in #(
  e) fiber_asm='yes' ;;
esac
fi


case $host_cpu in #(
  x86_64*|amd64*) :
    fiber_cpu="x86_64" ;; #(
  x86*|amd*|i?86*|pentium) :
    fiber_cpu="i386" ;; #(
  aarch64*|arm64*) :
    fiber_cpu="arm64" ;; #(
  arm*) :
    fiber_cpu="arm32" ;; #(
  ppc64*|powerpc64*) :
    fiber_cpu="ppc64" ;; #(
  ppc*|powerpc*) :
    fiber_cpu="ppc32" ;; #(
  riscv64*) :
    fiber_cpu="riscv64" ;; #(
  sparc64) :
    fiber_cpu="sparc64" ;; #(
  s390x*) :
    fiber_cpu="s390x" ;; #(
  loongarch64*) :
    fiber_cpu="loongarch64" ;; #(
  mips64*) :
    fiber_cpu="mips64" ;; #(
  mips*) :
    fiber_cpu="mips32" ;; #(
  *) :
    fiber_cpu="unknown"
 ;;
esac

case $host_os in #(
  darwin*) :
    fiber_os="mac" ;; #(
  aix*|os400*) :
    fiber_os="aix" ;; #(
  freebsd*) :
    fiber_os="freebsd" ;; #(
  midipix) :
    fiber_os="midipix" ;; #(
  *) :
    fiber_os="other"
 ;;
esac

case $fiber_cpu in #(
  x86_64) :
    fiber_asm_file_prefix="x86_64_sysv" ;; #(
  i386) :
    fiber_asm_file_prefix="i386_sysv" ;; #(
  arm64) :
    fiber_asm_file_prefix="arm64_aapcs" ;; #(
  arm32) :
    fiber_asm_file_prefix="arm_aapcs" ;; #(
  ppc64) :
    fiber_asm_file_prefix="ppc64_sysv" ;; #(
  ppc32) :
    fiber_asm_file_prefix="ppc32_sysv" ;; #(
  riscv64) :
    fiber_asm_file_prefix="riscv64_sysv" ;; #(
  sparc64) :
    fiber_asm_file_prefix="sparc64_sysv" ;; #(
  s390x) :
    fiber_asm_file_prefix="s390x_sysv" ;; #(
  loongarch64) :
    fiber_asm_file_prefix="loongarch64_sysv" ;; #(
  mips64) :
    fiber_asm_file_prefix="mips64_n64" ;; #(
  mips32) :
    fiber_asm_file_prefix="mips32_o32" ;; #(
  *) :
    fiber_asm_file_prefix="unknown"
 ;;
esac

if test "$fiber_os" = 'mac'; then
  fiber_asm_file="combined_sysv_macho_gas"
elif test "$fiber_os" = 'aix'; then
  # AIX uses a different calling convention (shared with non-_CALL_ELF Linux).
  # The AIX assembler isn't GNU, but the file is compatible.
  fiber_asm_file="${fiber_asm_file_prefix}_xcoff_gas"
elif test "$fiber_os" = 'freebsd'; then
  case $fiber_cpu in
    i386*)
      fiber_asm="no"
      ;;
    *)
      fiber_asm_file="${fiber_asm_file_prefix}_elf_gas"
      ;;
  esac
elif test "$fiber_os" = 'midipix'; then
  case $fiber_cpu in
    i386*)
      fiber_asm="no"
      ;;
    x86_64)
      fiber_asm_file="x86_64_ms_pe_gas"
      ;;
  esac
elif test "$fiber_asm_file_prefix" != 'unknown'; then
  fiber_asm_file="${fiber_asm_file_prefix}_elf_gas"
else
  fiber_asm="no"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether syscall to create shadow stack exists" >&5
printf %s "checking whether syscall to create shadow stack exists... " >&6; }
if test ${php_cv_have_shadow_stack_syscall+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_have_shadow_stack_syscall=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <unistd.h>
#include <sys/mman.h>
int main(void) {
  /* test if syscall 451, i.e., map_shadow_stack is available */
  void* base = (void *)syscall(451, 0, 0x20000, 0x1);
  if (base != (void*)-1) {
    munmap(base, 0x20000);
    return 0;
  }
  return 1;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_have_shadow_stack_syscall=yes
else case e in #(
  e) php_cv_have_shadow_stack_syscall=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_shadow_stack_syscall" >&5
printf "%s\n" "$php_cv_have_shadow_stack_syscall" >&6; }
if test "x$php_cv_have_shadow_stack_syscall" = xyes
then :
  fiber_asm_cflag="-DSHADOW_STACK_SYSCALL=1"
else case e in #(
  e) fiber_asm_cflag="-DSHADOW_STACK_SYSCALL=0" ;;
esac
fi

if test "$fiber_asm" = 'yes'; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fiber switching context" >&5
printf %s "checking for fiber switching context... " >&6; }


  case Zend/asm in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "Zend/asm"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/Zend/asm/"; ac_bdir="Zend/asm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in make_${fiber_asm_file}.S jump_${fiber_asm_file}.S; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta $fiber_asm_cflag -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta $fiber_asm_cflag -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta $fiber_asm_cflag -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $fiber_asm_cflag -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fiber_asm_file" >&5
printf "%s\n" "$fiber_asm_file" >&6; }
else
  if test "x$fiber_os" = xmac
then :

printf "%s\n" "#define _XOPEN_SOURCE 1" >>confdefs.h

fi
  ac_fn_c_check_header_compile "$LINENO" "ucontext.h" "ac_cv_header_ucontext_h" "$ac_includes_default"
if test "x$ac_cv_header_ucontext_h" = xyes
then :

printf "%s\n" "#define ZEND_FIBER_UCONTEXT 1" >>confdefs.h

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "fibers not available on this platform
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

fi

ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
if test "x$ac_cv_header_dlfcn_h" = xyes
then :
  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h

fi



ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default"
if test "x$ac_cv_header_cpuid_h" = xyes
then :
  printf "%s\n" "#define HAVE_CPUID_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "libproc.h" "ac_cv_header_libproc_h" "$ac_includes_default"
if test "x$ac_cv_header_libproc_h" = xyes
then :
  printf "%s\n" "#define HAVE_LIBPROC_H 1" >>confdefs.h

fi


ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid"
if test "x$ac_cv_func_getpid" = xyes
then :
  printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
if test "x$ac_cv_func_gettid" = xyes
then :
  printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
if test "x$ac_cv_func_kill" = xyes
then :
  printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap"
if test "x$ac_cv_func_mremap" = xyes
then :
  printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_attr_get_np" "ac_cv_func_pthread_attr_get_np"
if test "x$ac_cv_func_pthread_attr_get_np" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_ATTR_GET_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_attr_getstack" "ac_cv_func_pthread_attr_getstack"
if test "x$ac_cv_func_pthread_attr_getstack" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_ATTR_GETSTACK 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np"
if test "x$ac_cv_func_pthread_get_stackaddr_np" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_GET_STACKADDR_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_getattr_np" "ac_cv_func_pthread_getattr_np"
if test "x$ac_cv_func_pthread_getattr_np" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_GETATTR_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_stackseg_np" "ac_cv_func_pthread_stackseg_np"
if test "x$ac_cv_func_pthread_stackseg_np" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_STACKSEG_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
if test "x$ac_cv_func_strnlen" = xyes
then :
  printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h

fi


ac_fn_check_decl "$LINENO" "clock_gettime_nsec_np" "ac_cv_have_decl_clock_gettime_nsec_np" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_clock_gettime_nsec_np" = xyes
then :

printf "%s\n" "#define HAVE_CLOCK_GETTIME_NSEC_NP 1" >>confdefs.h

fi

ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
if test "x$ac_cv_func_sigsetjmp" = xyes
then :

else case e in #(
  e) ac_fn_check_decl "$LINENO" "sigsetjmp" "ac_cv_have_decl_sigsetjmp" "#include <setjmp.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_sigsetjmp" = xyes
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Required sigsetjmp not found.
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi ;;
esac
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the stack grows downwards" >&5
printf %s "checking whether the stack grows downwards... " >&6; }
if test ${php_cv_have_stack_limit+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_have_stack_limit=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdint.h>

#ifdef __has_builtin
# if __has_builtin(__builtin_frame_address)
#  define builtin_frame_address __builtin_frame_address(0)
# endif
#endif

int (*volatile f)(uintptr_t);

int stack_grows_downwards(uintptr_t arg) {
#ifdef builtin_frame_address
  uintptr_t addr = (uintptr_t)builtin_frame_address;
#else
  int local;
  uintptr_t addr = (uintptr_t)&local;
#endif

  return addr < arg;
}

int main(void) {
#ifdef builtin_frame_address
  uintptr_t addr = (uintptr_t)builtin_frame_address;
#else
  int local;
  uintptr_t addr = (uintptr_t)&local;
#endif

  f = stack_grows_downwards;
  return f(addr) ? 0 : 1;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_have_stack_limit=yes
else case e in #(
  e) php_cv_have_stack_limit=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_stack_limit" >&5
printf "%s\n" "$php_cv_have_stack_limit" >&6; }
if test "x$php_cv_have_stack_limit" = xyes
then :

printf "%s\n" "#define ZEND_CHECK_STACK_LIMIT 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable _FPU_SETCW" >&5
printf %s "checking for usable _FPU_SETCW... " >&6; }
if test ${php_cv_have__fpu_setcw+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fpu_control.h>
int
main (void)
{
    fpu_control_t fpu_oldcw, fpu_cw;
    volatile double result;
    double a = 2877.0;
    volatile double b = 1000000.0;

    _FPU_GETCW(fpu_oldcw);
    fpu_cw = (fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_SINGLE) | _FPU_DOUBLE;
    _FPU_SETCW(fpu_cw);
    result = a / b;
    _FPU_SETCW(fpu_oldcw);
    (void)result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have__fpu_setcw=yes
else case e in #(
  e) php_cv_have__fpu_setcw=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have__fpu_setcw" >&5
printf "%s\n" "$php_cv_have__fpu_setcw" >&6; }
if test "x$php_cv_have__fpu_setcw" = xyes
then :

printf "%s\n" "#define HAVE__FPU_SETCW 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable fpsetprec" >&5
printf %s "checking for usable fpsetprec... " >&6; }
if test ${php_cv_have_fpsetprec+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <machine/ieeefp.h>
int
main (void)
{
    fp_prec_t fpu_oldprec;
    volatile double result;
    double a = 2877.0;
    volatile double b = 1000000.0;

    fpu_oldprec = fpgetprec();
    fpsetprec(FP_PD);
    result = a / b;
    fpsetprec(fpu_oldprec);
    (void)result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have_fpsetprec=yes
else case e in #(
  e) php_cv_have_fpsetprec=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_fpsetprec" >&5
printf "%s\n" "$php_cv_have_fpsetprec" >&6; }
if test "x$php_cv_have_fpsetprec" = xyes
then :

printf "%s\n" "#define HAVE_FPSETPREC 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable _controlfp" >&5
printf %s "checking for usable _controlfp... " >&6; }
if test ${php_cv_have__controlfp+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <float.h>
int
main (void)
{
    unsigned int fpu_oldcw;
    volatile double result;
    double a = 2877.0;
    volatile double b = 1000000.0;

    fpu_oldcw = _controlfp(0, 0);
    _controlfp(_PC_53, _MCW_PC);
    result = a / b;
    _controlfp(fpu_oldcw, _MCW_PC);
    (void)result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have__controlfp=yes
else case e in #(
  e) php_cv_have__controlfp=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have__controlfp" >&5
printf "%s\n" "$php_cv_have__controlfp" >&6; }
if test "x$php_cv_have__controlfp" = xyes
then :

printf "%s\n" "#define HAVE__CONTROLFP 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable _controlfp_s" >&5
printf %s "checking for usable _controlfp_s... " >&6; }
if test ${php_cv_have__controlfp_s+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <float.h>
int
main (void)
{
    unsigned int fpu_oldcw, fpu_cw;
    volatile double result;
    double a = 2877.0;
    volatile double b = 1000000.0;

    _controlfp_s(&fpu_cw, 0, 0);
    fpu_oldcw = fpu_cw;
    _controlfp_s(&fpu_cw, _PC_53, _MCW_PC);
    result = a / b;
    _controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC);
    (void)result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have__controlfp_s=yes
else case e in #(
  e) php_cv_have__controlfp_s=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have__controlfp_s" >&5
printf "%s\n" "$php_cv_have__controlfp_s" >&6; }
if test "x$php_cv_have__controlfp_s" = xyes
then :

printf "%s\n" "#define HAVE__CONTROLFP_S 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether FPU control word can be manipulated by inline assembler" >&5
printf %s "checking whether FPU control word can be manipulated by inline assembler... " >&6; }
if test ${php_cv_have_fpu_inline_asm_x86+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
    unsigned int oldcw, cw;
    volatile double result;
    double a = 2877.0;
    volatile double b = 1000000.0;

    __asm__ __volatile__ ("fnstcw %0" : "=m" (*&oldcw));
    cw = (oldcw & ~0x0 & ~0x300) | 0x200;
    __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw));
    result = a / b;
    __asm__ __volatile__ ("fldcw %0" : : "m" (*&oldcw));
    (void)result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have_fpu_inline_asm_x86=yes
else case e in #(
  e) php_cv_have_fpu_inline_asm_x86=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_fpu_inline_asm_x86" >&5
printf "%s\n" "$php_cv_have_fpu_inline_asm_x86" >&6; }
if test "x$php_cv_have_fpu_inline_asm_x86" = xyes
then :

printf "%s\n" "#define HAVE_FPU_INLINE_ASM_X86 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dlsym() requires a leading underscore in symbol names" >&5
printf %s "checking whether dlsym() requires a leading underscore in symbol names... " >&6; }
if test "$cross_compiling" = yes; then :

else
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  lt_status=$lt_dlunknown
  cat > conftest.$ac_ext <<EOF
#line 83510 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif

#include <stdio.h>
#include <stdlib.h>

#ifdef RTLD_GLOBAL
#  define LT_DLGLOBAL		RTLD_GLOBAL
#else
#  ifdef DL_GLOBAL
#    define LT_DLGLOBAL		DL_GLOBAL
#  else
#    define LT_DLGLOBAL		0
#  endif
#endif

/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
   find out it does not work in some platform. */
#ifndef LT_DLLAZY_OR_NOW
#  ifdef RTLD_LAZY
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
#  else
#    ifdef DL_LAZY
#      define LT_DLLAZY_OR_NOW		DL_LAZY
#    else
#      ifdef RTLD_NOW
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
#      else
#        ifdef DL_NOW
#          define LT_DLLAZY_OR_NOW	DL_NOW
#        else
#          define LT_DLLAZY_OR_NOW	0
#        endif
#      endif
#    endif
#  endif
#endif

void fnord(void) { int i=42;}
int main (void)
{
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  int status = $lt_dlunknown;

  if (self)
    {
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
      /* dlclose (self); */
    }
  else
    puts (dlerror ());

    return (status);
}
EOF
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
    (./conftest; exit; ) >&5 2>/dev/null
    lt_status=$?
    case x$lt_status in
      x$lt_dlno_uscore) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
      x$lt_dlneed_uscore)
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

printf "%s\n" "#define DLSYM_NEEDS_UNDERSCORE 1" >>confdefs.h

 ;;
      x$lt_dlunknown|x*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } ;;
    esac
  else :
    # compilation failed
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  fi
fi
rm -fr conftest*


# Check whether --enable-gcc-global-regs was given.
if test ${enable_gcc_global_regs+y}
then :
  enableval=$enable_gcc_global_regs; ZEND_GCC_GLOBAL_REGS=$enableval
else case e in #(
  e) ZEND_GCC_GLOBAL_REGS=yes ;;
esac
fi


if test "x$ZEND_GCC_GLOBAL_REGS" = xno
then :

else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system supports global register variables" >&5
printf %s "checking whether system supports global register variables... " >&6; }
if test ${php_cv_have_global_register_vars+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#if defined(__GNUC__)
# define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#else
# define ZEND_GCC_VERSION 0
#endif
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(i386)
# define ZEND_VM_FP_GLOBAL_REG "%esi"
# define ZEND_VM_IP_GLOBAL_REG "%edi"
#elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__x86_64__)
# define ZEND_VM_FP_GLOBAL_REG "%r14"
# define ZEND_VM_IP_GLOBAL_REG "%r15"
#elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__powerpc64__)
# define ZEND_VM_FP_GLOBAL_REG "r28"
# define ZEND_VM_IP_GLOBAL_REG "r29"
#elif defined(__IBMC__) && ZEND_GCC_VERSION >= 4002 && defined(__powerpc64__)
# define ZEND_VM_FP_GLOBAL_REG "r28"
# define ZEND_VM_IP_GLOBAL_REG "r29"
#elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__aarch64__)
# define ZEND_VM_FP_GLOBAL_REG "x27"
# define ZEND_VM_IP_GLOBAL_REG "x28"
#elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__riscv) && __riscv_xlen == 64
# define ZEND_VM_FP_GLOBAL_REG "x18"
# define ZEND_VM_IP_GLOBAL_REG "x19"
#else
# error "global register variables are not supported"
#endif
typedef int (*opcode_handler_t)(void);
register void *FP  __asm__(ZEND_VM_FP_GLOBAL_REG);
register const opcode_handler_t *IP __asm__(ZEND_VM_IP_GLOBAL_REG);
int emu(const opcode_handler_t *ip, void *fp) {
  const opcode_handler_t *orig_ip = IP;
  void *orig_fp = FP;
  IP = ip;
  FP = fp;
  while ((*ip)());
  FP = orig_fp;
  IP = orig_ip;
}
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  php_cv_have_global_register_vars=yes
else case e in #(
  e) php_cv_have_global_register_vars=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have_global_register_vars" >&5
printf "%s\n" "$php_cv_have_global_register_vars" >&6; }
if test "x$php_cv_have_global_register_vars" = xyes
then :

printf "%s\n" "#define HAVE_GCC_GLOBAL_REGS 1" >>confdefs.h

else case e in #(
  e) ZEND_GCC_GLOBAL_REGS=no ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable global register variables support" >&5
printf %s "checking whether to enable global register variables support... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZEND_GCC_GLOBAL_REGS" >&5
printf "%s\n" "$ZEND_GCC_GLOBAL_REGS" >&6; }

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for preserve_none calling convention" >&5
printf %s "checking for preserve_none calling convention... " >&6; }
if test ${php_cv_preserve_none+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_preserve_none=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <stdint.h>

const char * const1 = "str1";
const char * const2 = "str2";
const char * const3 = "str3";
uint64_t key = UINT64_C(0x9d7f71d2bd296364);

uintptr_t _a = 0;
uintptr_t _b = 0;

uintptr_t __attribute__((preserve_none,noinline,used)) fun(uintptr_t a, uintptr_t b) {
	_a = a;
	_b = b;
	return (uintptr_t)const3;
}

uintptr_t __attribute__((preserve_none)) test(void) {
	uintptr_t ret;

#if defined(__x86_64__)
	__asm__ __volatile__(
		/* XORing to make it unlikely the value exists in any other register */
		"movq %1, %%r12\n"
		"xorq %3, %%r12\n"
		"movq %2, %%r13\n"
		"xorq %3, %%r13\n"
		"xorq %%rax, %%rax\n"
#if defined(__APPLE__)
		"call _fun\n"
#else
		"call fun\n"
#endif
		: "=a" (ret)
		: "r" (const1), "r" (const2), "r" (key)
		: "r12", "r13"
	);
#elif defined(__aarch64__)
	__asm__ __volatile__(
		/* XORing to make it unlikely the value exists in any other register */
		"eor    x20, %1, %3\n"
		"eor    x21, %2, %3\n"
		"eor    x0, x0, x0\n"
#if defined(__APPLE__)
		"bl     _fun\n"
#else
		"bl     fun\n"
#endif
		"mov    %0, x0\n"
		: "=r" (ret)
		: "r" (const1), "r" (const2), "r" (key)
		: "x0", "x21", "x22", "x30"
	);
#else
# error
#endif

	return ret;
}

int main(void) {

	/* JIT is making the following expectations about preserve_none:
	 * - The registers used for integer args 1 and 2
	 * - The register used for a single integer return value
	 *
	 * We check these expectations here:
	 */

	uintptr_t ret = test();

	if (_a != ((uintptr_t)const1 ^ key)) {
		fprintf(stderr, "arg1 mismatch\n");
		return 1;
	}
	if (_b != ((uintptr_t)const2 ^ key)) {
		fprintf(stderr, "arg2 mismatch\n");
		return 2;
	}
	if (ret != (uintptr_t)const3) {
		fprintf(stderr, "ret mismatch\n");
		return 3;
	}

	fprintf(stderr, "OK\n");

	return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_preserve_none=yes
else case e in #(
  e) php_cv_preserve_none=no ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

   ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_preserve_none" >&5
printf "%s\n" "$php_cv_preserve_none" >&6; }
  if test "x$php_cv_preserve_none" = xyes
then :


printf "%s\n" "#define HAVE_PRESERVE_NONE 1" >>confdefs.h


fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __cpuid_count is available" >&5
printf %s "checking whether __cpuid_count is available... " >&6; }
if test ${php_cv_have___cpuid_count+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cpuid.h>
int
main (void)
{
    unsigned eax, ebx, ecx, edx;
    __cpuid_count(0, 0, eax, ebx, ecx, edx);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  php_cv_have___cpuid_count=yes
else case e in #(
  e) php_cv_have___cpuid_count=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_have___cpuid_count" >&5
printf "%s\n" "$php_cv_have___cpuid_count" >&6; }
if test "x$php_cv_have___cpuid_count" = xyes
then :

printf "%s\n" "#define HAVE_CPUID_COUNT 1" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable thread safety" >&5
printf %s "checking whether to enable thread safety... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZEND_ZTS" >&5
printf "%s\n" "$ZEND_ZTS" >&6; }
if test "x$ZEND_ZTS" = xyes
then :


printf "%s\n" "#define ZTS 1" >>confdefs.h

  as_fn_append CFLAGS " -DZTS"

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Zend debugging" >&5
printf %s "checking whether to enable Zend debugging... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZEND_DEBUG" >&5
printf "%s\n" "$ZEND_DEBUG" >&6; }

if test "x$ZEND_DEBUG" = xyes
then :

  printf "%s\n" "#define ZEND_DEBUG 1" >>confdefs.h

  echo " $CFLAGS" | grep ' -g' >/dev/null || CFLAGS="$CFLAGS -g"

else case e in #(
  e) printf "%s\n" "#define ZEND_DEBUG 0" >>confdefs.h
 ;;
esac
fi

if test "x$GCC" = xyes
then :
  CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-sign-compare $CFLAGS"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wno-clobbered" >&5
printf %s "checking whether the C compiler accepts -Wno-clobbered... " >&6; }
if test ${ax_cv_check_cflags___Wno_clobbered+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wno-clobbered $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wno_clobbered=yes
else case e in #(
  e) ax_cv_check_cflags___Wno_clobbered=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_clobbered" >&5
printf "%s\n" "$ax_cv_check_cflags___Wno_clobbered" >&6; }
if test "x$ax_cv_check_cflags___Wno_clobbered" = xyes
then :
  CFLAGS="-Wno-clobbered $CFLAGS"
else case e in #(
  e) : ;;
esac
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wimplicit-fallthrough=1" >&5
printf %s "checking whether the C compiler accepts -Wimplicit-fallthrough=1... " >&6; }
if test ${ax_cv_check_cflags___Wimplicit_fallthrough_1+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wimplicit-fallthrough=1 $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wimplicit_fallthrough_1=yes
else case e in #(
  e) ax_cv_check_cflags___Wimplicit_fallthrough_1=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wimplicit_fallthrough_1" >&5
printf "%s\n" "$ax_cv_check_cflags___Wimplicit_fallthrough_1" >&6; }
if test "x$ax_cv_check_cflags___Wimplicit_fallthrough_1" = xyes
then :
  CFLAGS="$CFLAGS -Wimplicit-fallthrough=1"
else case e in #(
  e) : ;;
esac
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wduplicated-cond" >&5
printf %s "checking whether the C compiler accepts -Wduplicated-cond... " >&6; }
if test ${ax_cv_check_cflags___Wduplicated_cond+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wduplicated-cond $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wduplicated_cond=yes
else case e in #(
  e) ax_cv_check_cflags___Wduplicated_cond=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wduplicated_cond" >&5
printf "%s\n" "$ax_cv_check_cflags___Wduplicated_cond" >&6; }
if test "x$ax_cv_check_cflags___Wduplicated_cond" = xyes
then :
  CFLAGS="-Wduplicated-cond $CFLAGS"
else case e in #(
  e) : ;;
esac
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wlogical-op" >&5
printf %s "checking whether the C compiler accepts -Wlogical-op... " >&6; }
if test ${ax_cv_check_cflags___Wlogical_op+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wlogical-op $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wlogical_op=yes
else case e in #(
  e) ax_cv_check_cflags___Wlogical_op=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wlogical_op" >&5
printf "%s\n" "$ax_cv_check_cflags___Wlogical_op" >&6; }
if test "x$ax_cv_check_cflags___Wlogical_op" = xyes
then :
  CFLAGS="-Wlogical-op $CFLAGS"
else case e in #(
  e) : ;;
esac
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wformat-truncation" >&5
printf %s "checking whether the C compiler accepts -Wformat-truncation... " >&6; }
if test ${ax_cv_check_cflags___Wformat_truncation+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wformat-truncation $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wformat_truncation=yes
else case e in #(
  e) ax_cv_check_cflags___Wformat_truncation=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wformat_truncation" >&5
printf "%s\n" "$ax_cv_check_cflags___Wformat_truncation" >&6; }
if test "x$ax_cv_check_cflags___Wformat_truncation" = xyes
then :
  CFLAGS="-Wformat-truncation $CFLAGS"
else case e in #(
  e) : ;;
esac
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wstrict-prototypes" >&5
printf %s "checking whether the C compiler accepts -Wstrict-prototypes... " >&6; }
if test ${ax_cv_check_cflags___Wstrict_prototypes+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -Wstrict-prototypes $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___Wstrict_prototypes=yes
else case e in #(
  e) ax_cv_check_cflags___Wstrict_prototypes=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wstrict_prototypes" >&5
printf "%s\n" "$ax_cv_check_cflags___Wstrict_prototypes" >&6; }
if test "x$ax_cv_check_cflags___Wstrict_prototypes" = xyes
then :
  CFLAGS="-Wstrict-prototypes $CFLAGS"
else case e in #(
  e) : ;;
esac
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-common" >&5
printf %s "checking whether the C compiler accepts -fno-common... " >&6; }
if test ${ax_cv_check_cflags___fno_common+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -fno-common $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___fno_common=yes
else case e in #(
  e) ax_cv_check_cflags___fno_common=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_common" >&5
printf "%s\n" "$ax_cv_check_cflags___fno_common" >&6; }
if test "x$ax_cv_check_cflags___fno_common" = xyes
then :
  CFLAGS="-fno-common $CFLAGS"
else case e in #(
  e) : ;;
esac
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Zend memory manager alignment and log values" >&5
printf %s "checking for Zend memory manager alignment and log values... " >&6; }
if test ${php_cv_align_mm+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_align_mm="(size_t)8 (size_t)3 0"
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <stdlib.h>

typedef union _mm_align_test {
  void *ptr;
  double dbl;
  long lng;
} mm_align_test;

#if (defined (__GNUC__) && __GNUC__ >= 2)
#define ZEND_MM_ALIGNMENT (__alignof__ (mm_align_test))
#else
#define ZEND_MM_ALIGNMENT (sizeof(mm_align_test))
#endif

int main(void)
{
  size_t i = ZEND_MM_ALIGNMENT;
  int zeros = 0;
  FILE *fp;

  while (i & ~0x1) {
    zeros++;
    i = i >> 1;
  }

  fp = fopen("conftest.zend", "w");
  fprintf(fp, "(size_t)%zu (size_t)%d %d\n",
    ZEND_MM_ALIGNMENT, zeros, ZEND_MM_ALIGNMENT < 4);
  fclose(fp);

  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_align_mm=$(cat conftest.zend)
else case e in #(
  e) php_cv_align_mm=failed ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_align_mm" >&5
printf "%s\n" "$php_cv_align_mm" >&6; }
if test "x$php_cv_align_mm" = xfailed
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "ZEND_MM alignment defines failed.
See 'config.log' for more details" "$LINENO" 5; }
else case e in #(
  e) zend_mm_alignment=$(echo $php_cv_align_mm | cut -d ' ' -f 1)
  zend_mm_alignment_log2=$(echo $php_cv_align_mm | cut -d ' ' -f 2)
  zend_mm_8byte_realign=$(echo $php_cv_align_mm | cut -d ' ' -f 3)

printf "%s\n" "#define ZEND_MM_ALIGNMENT $zend_mm_alignment" >>confdefs.h


printf "%s\n" "#define ZEND_MM_ALIGNMENT_LOG2 $zend_mm_alignment_log2" >>confdefs.h


printf "%s\n" "#define ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT $zend_mm_8byte_realign" >>confdefs.h

 ;;
esac
fi

# Check whether --enable-zend-signals was given.
if test ${enable_zend_signals+y}
then :
  enableval=$enable_zend_signals; ZEND_SIGNALS=$enableval
else case e in #(
  e) ZEND_SIGNALS=yes ;;
esac
fi



  for ac_func in sigaction
do :
  ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
if test "x$ac_cv_func_sigaction" = xyes
then :
  printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h

else case e in #(
  e) ZEND_SIGNALS=no ;;
esac
fi

done
if test "x$ZEND_SIGNALS" = xyes
then :

printf "%s\n" "#define ZEND_SIGNALS 1" >>confdefs.h

  as_fn_append CFLAGS " -DZEND_SIGNALS"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Zend signal handling" >&5
printf %s "checking whether to enable Zend signal handling... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZEND_SIGNALS" >&5
printf "%s\n" "$ZEND_SIGNALS" >&6; }

# Check whether --enable-zend-max-execution-timers was given.
if test ${enable_zend_max_execution_timers+y}
then :
  enableval=$enable_zend_max_execution_timers; ZEND_MAX_EXECUTION_TIMERS=$enableval
else case e in #(
  e) ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS ;;
esac
fi


case $host_alias in #(
  *linux*|*freebsd*) :
     ;; #(
  *) :
    ZEND_MAX_EXECUTION_TIMERS=no ;;
esac

if test "x$ZEND_MAX_EXECUTION_TIMERS" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing timer_create" >&5
printf %s "checking for library containing timer_create... " >&6; }
if test ${ac_cv_search_timer_create+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char timer_create (void);
int
main (void)
{
return timer_create ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_timer_create=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_timer_create+y}
then :
  break
fi
done
if test ${ac_cv_search_timer_create+y}
then :

else case e in #(
  e) ac_cv_search_timer_create=no ;;
esac
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_create" >&5
printf "%s\n" "$ac_cv_search_timer_create" >&6; }
ac_res=$ac_cv_search_timer_create
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else case e in #(
  e) ZEND_MAX_EXECUTION_TIMERS=no ;;
esac
fi

fi

if test "x$ZEND_MAX_EXECUTION_TIMERS" = xyes
then :

printf "%s\n" "#define ZEND_MAX_EXECUTION_TIMERS 1" >>confdefs.h

    as_fn_append CFLAGS " -DZEND_MAX_EXECUTION_TIMERS"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable Zend max execution timers" >&5
printf %s "checking whether to enable Zend max execution timers... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZEND_MAX_EXECUTION_TIMERS" >&5
printf "%s\n" "$ZEND_MAX_EXECUTION_TIMERS" >&6; }



ZEND_EXTRA_LIBS=$LIBS
unset LIBS


for include_path in $abs_srcdir; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="-I$ai_p $INCLUDES"
  fi


fi
done


for include_path in $abs_srcdir/main; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="-I$ai_p $INCLUDES"
  fi


fi
done


for include_path in $abs_builddir; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="-I$ai_p $INCLUDES"
  fi


fi
done


for include_path in $abs_builddir/main; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="-I$ai_p $INCLUDES"
  fi


fi
done


for include_path in $abs_builddir/TSRM; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


for include_path in $abs_builddir/Zend; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


for include_path in $abs_srcdir/Zend; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


for include_path in $abs_srcdir/TSRM; do
  if test "$include_path" != "/usr/include"
then :


  if test -z "$include_path" || echo "$include_path" | grep '^/' >/dev/null ; then
    ai_p=$include_path
  else

    ep_dir=$(echo $include_path|$SED 's%/*[^/][^/]*/*$%%')

    if test -z $ep_dir ; then
      ep_realdir=$(pwd)
    else
      ep_realdir=$(cd "$ep_dir" && pwd)
    fi
    ai_p="$ep_realdir"/$(basename "$include_path")
  fi



  unique=$(echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INCLUDEPATH$unique=set"
    INCLUDES="$INCLUDES -I$ai_p"
  fi


fi
done


EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS"
unset LDFLAGS

test "$program_prefix" != NONE &&
  program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
# By default was 's,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`


if test "x$prefix" = xNONE
then :
  prefix=/usr/local
fi
if test "x$exec_prefix" = xNONE
then :
  exec_prefix='${prefix}'
fi
if test "x$program_prefix" = xNONE
then :
  program_prefix=
fi
if test "x$program_suffix" = xNONE
then :
  program_suffix=
fi

orig_libdir=$libdir

case $libdir in #(
  '${exec_prefix}/lib') :
    libdir=$libdir/php ;; #(
  ${exec_prefix}/${PHP_LIBDIR}) :
    libdir=$libdir/php ;; #(
  *) :
     ;;
esac

case $(eval echo $datadir) in #(
  '${prefix}/share') :
    datadir=$datadir/php ;; #(
  ${prefix}/share) :
    datadir=$datadir/php ;; #(
  *) :
     ;;
esac

phptempdir=$(pwd)/libs

old_exec_prefix=$exec_prefix
old_libdir=$libdir
old_datadir=$datadir
exec_prefix=$(eval echo $exec_prefix)
libdir=$(eval echo $libdir)
datadir=$(eval eval echo $datadir)

ZEND_MODULE_API_NO=$($EGREP '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|"${SED}" 's/#define ZEND_MODULE_API_NO //')


if ${EXTENSION_DIR:+false} :
then :

  extbasedir=$ZEND_MODULE_API_NO
  if test "x$oldstyleextdir" = xyes
then :

    if test "x$PHP_DEBUG" = x1
then :
  part1=debug
else case e in #(
  e) part1=no-debug ;;
esac
fi
    if test "x$PHP_THREAD_SAFETY" = xyes
then :
  part2=zts
else case e in #(
  e) part2=non-zts ;;
esac
fi
    extbasedir=$part1-$part2-$extbasedir
    EXTENSION_DIR=$libdir/extensions/$extbasedir

else case e in #(
  e)
    if test "x$PHP_THREAD_SAFETY" = xyes
then :
  extbasedir=$extbasedir-zts
fi
    if test "x$PHP_DEBUG" = x1
then :
  extbasedir=$extbasedir-debug
fi
    EXTENSION_DIR=$libdir/$extbasedir
   ;;
esac
fi

fi

case $PHP_LAYOUT in #(
  GNU) :
    datarootdir=$prefix/share ;; #(
  *) :
    datarootdir=$prefix/php ;;
esac

EXPANDED_PEAR_INSTALLDIR=$(eval echo $PEAR_INSTALLDIR)
EXPANDED_EXTENSION_DIR=$(eval echo $EXTENSION_DIR)
EXPANDED_LOCALSTATEDIR=$(eval echo $localstatedir)
EXPANDED_BINDIR=$(eval echo $bindir)
EXPANDED_SBINDIR=$(eval echo $sbindir)
EXPANDED_MANDIR=$(eval echo $mandir)
EXPANDED_LIBDIR=$libdir
EXPANDED_SYSCONFDIR=$(eval echo $sysconfdir)
EXPANDED_DATADIR=$datadir
EXPANDED_PHP_CONFIG_FILE_PATH=$(eval echo "$PHP_CONFIG_FILE_PATH")
EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=$(eval echo "$PHP_CONFIG_FILE_SCAN_DIR")
INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR

exec_prefix=$old_exec_prefix
libdir=$old_libdir
datadir=$old_datadir





















  OLD_RPATHS=$PHP_RPATHS
  unset PHP_RPATHS

  for i in $OLD_RPATHS; do
        PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
        PHP_RPATHS="$PHP_RPATHS -R $i"
        NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
  done

  if test "x$PHP_RPATH" = xno
then :

    unset PHP_RPATHS
    unset NATIVE_RPATHS

fi



  unset ac_new_flags
  for i in $PHP_LDFLAGS; do
    case $i in
    -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  PHP_LDFLAGS=$ac_new_flags


  unset ac_new_flags
  for i in $LDFLAGS; do
    case $i in
    -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  LDFLAGS=$ac_new_flags


EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"


if ${PHP_UNAME:+false} :
then :
  PHP_UNAME=$(uname -a | xargs)
fi

printf "%s\n" "#define PHP_UNAME \"$PHP_UNAME\"" >>confdefs.h


PHP_OS=$(uname | xargs)

printf "%s\n" "#define PHP_OS \"$PHP_OS\"" >>confdefs.h



if ${PHP_BUILD_SYSTEM:+false} :
then :
  PHP_BUILD_SYSTEM=$PHP_UNAME
fi

printf "%s\n" "#define PHP_BUILD_SYSTEM \"$PHP_BUILD_SYSTEM\"" >>confdefs.h



if ${PHP_BUILD_PROVIDER:+false} :
then :

else case e in #(
  e)
printf "%s\n" "#define PHP_BUILD_PROVIDER \"$PHP_BUILD_PROVIDER\"" >>confdefs.h
 ;;
esac
fi


if ${PHP_BUILD_COMPILER:+false} :
then :

else case e in #(
  e)
printf "%s\n" "#define PHP_BUILD_COMPILER \"$PHP_BUILD_COMPILER\"" >>confdefs.h
 ;;
esac
fi


if ${PHP_BUILD_ARCH:+false} :
then :

else case e in #(
  e)
printf "%s\n" "#define PHP_BUILD_ARCH \"$PHP_BUILD_ARCH\"" >>confdefs.h
 ;;
esac
fi


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FASTCGI_OBJS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_SAPI_OBJS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_BINARY_OBJS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_GLOBAL_OBJS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_BINARIES"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_MODULES"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_ZEND_EX"


  PHP_VAR_SUBST="$PHP_VAR_SUBST bindir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST sbindir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST exec_prefix"




  PHP_VAR_SUBST="$PHP_VAR_SUBST program_prefix"





  PHP_VAR_SUBST="$PHP_VAR_SUBST program_suffix"



  PHP_VAR_SUBST="$PHP_VAR_SUBST includedir"




  PHP_VAR_SUBST="$PHP_VAR_SUBST orig_libdir"



  PHP_VAR_SUBST="$PHP_VAR_SUBST libdir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST mandir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST phptempdir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST prefix"


  PHP_VAR_SUBST="$PHP_VAR_SUBST localstatedir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST datadir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST datarootdir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST sysconfdir"


  PHP_VAR_SUBST="$PHP_VAR_SUBST EXEEXT"


  PHP_VAR_SUBST="$PHP_VAR_SUBST CC"


  PHP_VAR_SUBST="$PHP_VAR_SUBST BUILD_CC"


  PHP_VAR_SUBST="$PHP_VAR_SUBST CFLAGS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST CFLAGS_CLEAN"


  PHP_VAR_SUBST="$PHP_VAR_SUBST CPP"


  PHP_VAR_SUBST="$PHP_VAR_SUBST CPPFLAGS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST CXX"


  PHP_VAR_SUBST="$PHP_VAR_SUBST CXXFLAGS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST CXXFLAGS_CLEAN"




  PHP_VAR_SUBST="$PHP_VAR_SUBST EXTENSION_DIR"



  PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LDFLAGS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LDFLAGS_PROGRAM"




  PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LIBS"



  PHP_VAR_SUBST="$PHP_VAR_SUBST ZEND_EXTRA_LIBS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST INCLUDES"


  PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_INCLUDES"


  PHP_VAR_SUBST="$PHP_VAR_SUBST INSTALL_IT"


  PHP_VAR_SUBST="$PHP_VAR_SUBST LIBTOOL"


  PHP_VAR_SUBST="$PHP_VAR_SUBST LN_S"


  PHP_VAR_SUBST="$PHP_VAR_SUBST NATIVE_RPATHS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST OVERALL_TARGET"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_RPATHS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_SAPI"


  PHP_VAR_SUBST="$PHP_VAR_SUBST SHELL"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FRAMEWORKS"


  PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_FRAMEWORKPATH"


  PHP_VAR_SUBST="$PHP_VAR_SUBST INSTALL_HEADERS"


if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then
  CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags"
  CPPFLAGS="$CPPFLAGS $ac_cv_pthreads_cflags"
fi

if test "x$PHP_WERROR" = xyes
then :

  CFLAGS="$CFLAGS -Werror"
  CXXFLAGS="$CXXFLAGS -Werror"

fi

if test "$PHP_MEMORY_SANITIZER" = "yes" &&
   test "$PHP_ADDRESS_SANITIZER" = "yes"; then
   as_fn_error $? "MemorySanitizer and AddressSanitizer are mutually exclusive" "$LINENO" 5
fi

if test "x$PHP_MEMORY_SANITIZER" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=memory -fsanitize-memory-track-origins" >&5
printf %s "checking whether the C compiler accepts -fsanitize=memory -fsanitize-memory-track-origins... " >&6; }
if test ${ax_cv_check_cflags___fsanitize_memory__fsanitize_memory_track_origins+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -fsanitize=memory -fsanitize-memory-track-origins $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___fsanitize_memory__fsanitize_memory_track_origins=yes
else case e in #(
  e) ax_cv_check_cflags___fsanitize_memory__fsanitize_memory_track_origins=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_memory__fsanitize_memory_track_origins" >&5
printf "%s\n" "$ax_cv_check_cflags___fsanitize_memory__fsanitize_memory_track_origins" >&6; }
if test "x$ax_cv_check_cflags___fsanitize_memory__fsanitize_memory_track_origins" = xyes
then :

    CFLAGS="$CFLAGS -fsanitize=memory -fsanitize-memory-track-origins"
    CXXFLAGS="$CXXFLAGS -fsanitize=memory -fsanitize-memory-track-origins"

else case e in #(
  e) as_fn_error $? "MemorySanitizer is not available" "$LINENO" 5 ;;
esac
fi


fi

if test "x$PHP_ADDRESS_SANITIZER" = xyes
then :
  if test "x$PHP_VALGRIND" = xno
then :

else case e in #(
  e) as_fn_error $? "Valgrind and address sanitizer are not compatible. Either disable Valgrind
(remove --with-valgrind) or disable address sanitizer (remove
--enable-address-sanitizer)." "$LINENO" 5 ;;
esac
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=address" >&5
printf %s "checking whether the C compiler accepts -fsanitize=address... " >&6; }
if test ${ax_cv_check_cflags___fsanitize_address+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -fsanitize=address $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___fsanitize_address=yes
else case e in #(
  e) ax_cv_check_cflags___fsanitize_address=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_address" >&5
printf "%s\n" "$ax_cv_check_cflags___fsanitize_address" >&6; }
if test "x$ax_cv_check_cflags___fsanitize_address" = xyes
then :

    CFLAGS="$CFLAGS -fsanitize=address -DZEND_TRACK_ARENA_ALLOC"
    CXXFLAGS="$CXXFLAGS -fsanitize=address -DZEND_TRACK_ARENA_ALLOC"

else case e in #(
  e) as_fn_error $? "AddressSanitizer is not available" "$LINENO" 5 ;;
esac
fi


fi

if test "x$PHP_UNDEFINED_SANITIZER" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=undefined" >&5
printf %s "checking whether the C compiler accepts -fsanitize=undefined... " >&6; }
if test ${ax_cv_check_cflags___fsanitize_undefined+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -fsanitize=undefined $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___fsanitize_undefined=yes
else case e in #(
  e) ax_cv_check_cflags___fsanitize_undefined=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_undefined" >&5
printf "%s\n" "$ax_cv_check_cflags___fsanitize_undefined" >&6; }
if test "x$ax_cv_check_cflags___fsanitize_undefined" = xyes
then :

    CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
    CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-sanitize=object-size" >&5
printf %s "checking whether the C compiler accepts -fno-sanitize=object-size... " >&6; }
if test ${ax_cv_check_cflags___fno_sanitize_object_size+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
  ax_check_save_flags=$CFLAGS
  if test x"$GCC" = xyes ; then
    add_gnu_werror="-Werror"
  fi
  CFLAGS="$CFLAGS  -fno-sanitize=object-size $add_gnu_werror"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ax_cv_check_cflags___fno_sanitize_object_size=yes
else case e in #(
  e) ax_cv_check_cflags___fno_sanitize_object_size=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  CFLAGS=$ax_check_save_flags ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_sanitize_object_size" >&5
printf "%s\n" "$ax_cv_check_cflags___fno_sanitize_object_size" >&6; }
if test "x$ax_cv_check_cflags___fno_sanitize_object_size" = xyes
then :

                  CFLAGS="$CFLAGS -fno-sanitize=object-size"
      CXXFLAGS="$CFLAGS -fno-sanitize=object-size"

else case e in #(
  e) : ;;
esac
fi


            OLD_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS -fno-sanitize-recover=undefined"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to add -fno-sanitize=function" >&5
printf %s "checking whether to add -fno-sanitize=function... " >&6; }
if test ${php_cv_ubsan_no_function+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test "$cross_compiling" = yes
then :
  php_cv_ubsan_no_function=no
else case e in #(
  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

      void foo(char *string) { (void)string; }
      int main(void) {
        void (*f)(void *) = (void (*)(void *))foo;
        f("foo");
        return 0;
      }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  php_cv_ubsan_no_function=no
else case e in #(
  e) php_cv_ubsan_no_function=yes ;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $php_cv_ubsan_no_function" >&5
printf "%s\n" "$php_cv_ubsan_no_function" >&6; }
    CFLAGS=$OLD_CFLAGS
    if test "x$php_cv_ubsan_no_function" = xyes
then :

      CFLAGS="$CFLAGS -fno-sanitize=function"
      CXXFLAGS="$CFLAGS -fno-sanitize=function"

fi

else case e in #(
  e) as_fn_error $? "UndefinedBehaviorSanitizer is not available" "$LINENO" 5 ;;
esac
fi


fi

if test "$PHP_MEMORY_SANITIZER" = "yes" ||
   test "$PHP_ADDRESS_SANITIZER" = "yes" ||
   test "$PHP_UNDEFINED_SANITIZER" = "yes"; then
    CFLAGS="$CFLAGS -fno-omit-frame-pointer"
    CXXFLAGS="$CXXFLAGS -fno-omit-frame-pointer"
fi


# Check whether --enable- was given.
if test ${enable_+y}
then :
  enableval=$enable_;
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${T_MD}Configuring libtool${T_ME}" >&5
printf "%s\n" "${T_MD}Configuring libtool${T_ME}" >&6; }


AR_FLAGS=cr



# Check whether --enable-shared was given.
if test ${enable_shared+y}
then :
  enableval=$enable_shared;     p=${PACKAGE-default}
    case $enableval in
    yes) enable_shared=yes ;;
    no) enable_shared=no ;;
    *)
      enable_shared=no
      # Look at the argument we got.  We use all the common list separators.
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
      for pkg in $enableval; do
	IFS="$lt_save_ifs"
	if test "X$pkg" = "X$p"; then
	  enable_shared=yes
	fi
      done
      IFS="$lt_save_ifs"
      ;;
    esac
else case e in #(
  e) enable_shared=yes ;;
esac
fi


# Check whether --enable-static was given.
if test ${enable_static+y}
then :
  enableval=$enable_static;     p=${PACKAGE-default}
    case $enableval in
    yes) enable_static=yes ;;
    no) enable_static=no ;;
    *)
     enable_static=no
      # Look at the argument we got.  We use all the common list separators.
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
      for pkg in $enableval; do
	IFS="$lt_save_ifs"
	if test "X$pkg" = "X$p"; then
	  enable_static=yes
	fi
      done
      IFS="$lt_save_ifs"
      ;;
    esac
else case e in #(
  e) enable_static=yes ;;
esac
fi


# Check whether --enable-fast-install was given.
if test ${enable_fast_install+y}
then :
  enableval=$enable_fast_install;     p=${PACKAGE-default}
    case $enableval in
    yes) enable_fast_install=yes ;;
    no) enable_fast_install=no ;;
    *)
      enable_fast_install=no
      # Look at the argument we got.  We use all the common list separators.
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
      for pkg in $enableval; do
	IFS="$lt_save_ifs"
	if test "X$pkg" = "X$p"; then
	  enable_fast_install=yes
	fi
      done
      IFS="$lt_save_ifs"
      ;;
    esac
else case e in #(
  e) enable_fast_install=yes ;;
esac
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
printf %s "checking for a sed that does not truncate output... " >&6; }
if test ${lt_cv_path_SED+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) # Loop through the user's path and test for sed and gsed.
# Then use that list of sed's as ones to test for truncation.
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for lt_ac_prog in sed gsed; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
      fi
    done
  done
done
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
# along with /bin/sed that truncates output.
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  test ! -f $lt_ac_sed && continue
  cat /dev/null > conftest.in
  lt_ac_count=0
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  # Check for GNU sed and select it if it is found.
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
    lt_cv_path_SED=$lt_ac_sed
    break
  fi
  while true; do
    cat conftest.in conftest.in >conftest.tmp
    mv conftest.tmp conftest.in
    cp conftest.in conftest.nl
    echo >>conftest.nl
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
    cmp -s conftest.out conftest.nl || break
    # 10000 chars as input seems more than enough
    test $lt_ac_count -gt 10 && break
    lt_ac_count=`expr $lt_ac_count + 1`
    if test $lt_ac_count -gt $lt_ac_max; then
      lt_ac_max=$lt_ac_count
      lt_cv_path_SED=$lt_ac_sed
    fi
  done
done
 ;;
esac
fi

SED=$lt_cv_path_SED
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
printf "%s\n" "$SED" >&6; }


# Check whether --with-gnu-ld was given.
if test ${with_gnu_ld+y}
then :
  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else case e in #(
  e) with_gnu_ld=no ;;
esac
fi

ac_prog=ld
if test "$GCC" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
printf %s "checking for ld used by $CC... " >&6; }
  case $host in
  *-*-mingw*)
    # gcc leaves a trailing carriage return which upsets mingw
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  *)
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  esac
  case $ac_prog in
    # Accept absolute paths.
    [\\/]* | ?:[\\/]*)
      re_direlt='/[^/][^/]*/\.\./'
      # Canonicalize the pathname of ld
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
      done
      test -z "$LD" && LD="$ac_prog"
      ;;
  "")
    # If it fails, then pretend we aren't using GCC.
    ac_prog=ld
    ;;
  *)
    # If it is relative, then search for the first ld in PATH.
    with_gnu_ld=unknown
    ;;
  esac
elif test "$with_gnu_ld" = yes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
printf %s "checking for GNU ld... " >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
printf %s "checking for non-GNU ld... " >&6; }
fi
if test ${lt_cv_path_LD+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -z "$LD"; then
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  for ac_dir in $PATH; do
    IFS="$lt_save_ifs"
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
      lt_cv_path_LD="$ac_dir/$ac_prog"
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # but apparently some variants of GNU ld only accept -v.
      # Break only if it was the GNU/non-GNU ld that we prefer.
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
      *GNU* | *'with BFD'*)
	test "$with_gnu_ld" != no && break
	;;
      *)
	test "$with_gnu_ld" != yes && break
	;;
      esac
    fi
  done
  IFS="$lt_save_ifs"
else
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi ;;
esac
fi

LD="$lt_cv_path_LD"
if test -n "$LD"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
printf "%s\n" "$LD" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
if test ${lt_cv_prog_gnu_ld+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
  lt_cv_prog_gnu_ld=yes
  ;;
*)
  lt_cv_prog_gnu_ld=no
  ;;
esac ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
printf %s "checking for $LD option to reload object files... " >&6; }
if test ${lt_cv_ld_reload_flag+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_ld_reload_flag='-r' ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
reload_flag=$lt_cv_ld_reload_flag
case $reload_flag in
"" | " "*) ;;
*) reload_flag=" $reload_flag" ;;
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
  darwin*)
    if test "$GCC" = yes; then
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
    else
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
    fi
    ;;
esac

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
printf %s "checking for BSD-compatible nm... " >&6; }
if test ${lt_cv_path_NM+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$NM"; then
  # Let the user override the test.
  lt_cv_path_NM="$NM"
else
  lt_nm_to_check="${ac_tool_prefix}nm"
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
    lt_nm_to_check="$lt_nm_to_check nm"
  fi
  for lt_tmp_nm in $lt_nm_to_check; do
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
      IFS="$lt_save_ifs"
      test -z "$ac_dir" && ac_dir=.
      tmp_nm="$ac_dir/$lt_tmp_nm"
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
	# Check to see if the nm accepts a BSD-compat flag.
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
	#   nm: unknown option "B" ignored
	# Tru64's nm complains that /dev/null is an invalid object file
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
	*/dev/null* | *'Invalid file or object type'*)
	  lt_cv_path_NM="$tmp_nm -B"
	  break
	  ;;
	*)
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
	  */dev/null*)
	    lt_cv_path_NM="$tmp_nm -p"
	    break
	    ;;
	  *)
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
	    continue # so that we can try to find one that supports BSD flags
	    ;;
	  esac
	  ;;
	esac
      fi
    done
    IFS="$lt_save_ifs"
  done
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
printf "%s\n" "$lt_cv_path_NM" >&6; }
NM="$lt_cv_path_NM"

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
printf %s "checking how to recognize dependent libraries... " >&6; }
if test ${lt_cv_deplibs_check_method+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given extended regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.

case $host_os in
aix[4-9]*)
  lt_cv_deplibs_check_method=pass_all
  ;;

beos* | haiku*)
  lt_cv_deplibs_check_method=pass_all
  ;;

bsdi[45]*)
  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
  lt_cv_file_magic_cmd='/usr/bin/file -L'
  lt_cv_file_magic_test_file=/shlib/libc.so
  ;;

cygwin*)
  # func_win32_libid is a shell function defined in ltmain.sh
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  lt_cv_file_magic_cmd='func_win32_libid'
  ;;

mingw* | pw32*)
  # Base MSYS/MinGW do not provide the 'file' command needed by
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
  # unless we find 'file', for example because we are cross-compiling.
  if ( file / ) >/dev/null 2>&1; then
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
    lt_cv_file_magic_cmd='func_win32_libid'
  else
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
    lt_cv_file_magic_cmd='$OBJDUMP -f'
  fi
  ;;

darwin* | rhapsody*)
  lt_cv_deplibs_check_method=pass_all
  ;;

freebsd* | dragonfly*)
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
    case $host_cpu in
    i*86 )
      # Not sure whether the presence of OpenBSD here was a mistake.
      # Let's accept both of them until this is cleared up.
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
      lt_cv_file_magic_cmd=/usr/bin/file
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
      ;;
    esac
  else
    lt_cv_deplibs_check_method=pass_all
  fi
  ;;

gnu*)
  lt_cv_deplibs_check_method=pass_all
  ;;

hpux10.20* | hpux11*)
  lt_cv_file_magic_cmd=/usr/bin/file
  case $host_cpu in
  ia64*)
    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
    ;;
  hppa*64*)
    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
    ;;
  *)
    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
    ;;
  esac
  ;;

interix[3-9]*)
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
  ;;

irix5* | irix6* | nonstopux*)
  case $LD in
  *-32|*"-32 ") libmagic=32-bit;;
  *-n32|*"-n32 ") libmagic=N32;;
  *-64|*"-64 ") libmagic=64-bit;;
  *) libmagic=never-match;;
  esac
  lt_cv_deplibs_check_method=pass_all
  ;;

# This must be Linux ELF.
linux* | k*bsd*-gnu)
  lt_cv_deplibs_check_method=pass_all
  ;;

netbsd*)
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
  else
    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
  fi
  ;;

newos6*)
  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
  lt_cv_file_magic_cmd=/usr/bin/file
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
  ;;

nto-qnx*)
  lt_cv_deplibs_check_method=unknown
  ;;

openbsd*)
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
  else
    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
  fi
  ;;

osf3* | osf4* | osf5*)
  lt_cv_deplibs_check_method=pass_all
  ;;

rdos*)
  lt_cv_deplibs_check_method=pass_all
  ;;

solaris*)
  lt_cv_deplibs_check_method=pass_all
  ;;

sysv4 | sysv4.3*)
  case $host_vendor in
  motorola)
    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
    ;;
  ncr)
    lt_cv_deplibs_check_method=pass_all
    ;;
  sequent)
    lt_cv_file_magic_cmd='/bin/file'
    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
    ;;
  sni)
    lt_cv_file_magic_cmd='/bin/file'
    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
    lt_cv_file_magic_test_file=/lib/libc.so
    ;;
  siemens)
    lt_cv_deplibs_check_method=pass_all
    ;;
  pc)
    lt_cv_deplibs_check_method=pass_all
    ;;
  esac
  ;;

sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  lt_cv_deplibs_check_method=pass_all
  ;;
esac
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown




# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}

# If no C compiler flags were specified, use CFLAGS.
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}

# Allow CC to be a program name with arguments.
compiler=$CC

#AC_ARG_ENABLE([libtool-lock],
#[  --disable-libtool-lock  avoid locking (might break parallel builds)])
#test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes

# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
  # Find out which ABI we are using.
  echo 'int i;' > conftest.$ac_ext
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
    case `/usr/bin/file conftest.$ac_objext` in
    *ELF-32*)
      HPUX_IA64_MODE="32"
      ;;
    *ELF-64*)
      HPUX_IA64_MODE="64"
      ;;
    esac
  fi
  rm -rf conftest*
  ;;
*-*-irix6*)
  # Find out which ABI we are using.
  echo '#line 85999 "configure"' > conftest.$ac_ext
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
   if test "$lt_cv_prog_gnu_ld" = yes; then
    case `/usr/bin/file conftest.$ac_objext` in
    *32-bit*)
      LD="${LD-ld} -melf32bsmip"
      ;;
    *N32*)
      LD="${LD-ld} -melf32bmipn32"
      ;;
    *64-bit*)
      LD="${LD-ld} -melf64bmip"
      ;;
    esac
   else
    case `/usr/bin/file conftest.$ac_objext` in
    *32-bit*)
      LD="${LD-ld} -32"
      ;;
    *N32*)
      LD="${LD-ld} -n32"
      ;;
    *64-bit*)
      LD="${LD-ld} -64"
      ;;
    esac
   fi
  fi
  rm -rf conftest*
  ;;

x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|sparc*-*linux*)
  # Find out which ABI we are using.
  echo 'int i;' > conftest.$ac_ext
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
    case `/usr/bin/file conftest.o` in
    *32-bit*)
      case $host in
        x86_64-*kfreebsd*-gnu)
          LD="${LD-ld} -m elf_i386_fbsd"
          ;;
        x86_64-*linux*)
          LD="${LD-ld} -m elf_i386"
          ;;
        powerpc64le-*linux*)
          LD="${LD-ld} -m elf32lppclinux"
          ;;
        powerpc64-*linux*)
          LD="${LD-ld} -m elf32ppclinux"
          ;;
        s390x-*linux*)
          LD="${LD-ld} -m elf_s390"
          ;;
        sparc64-*linux*)
          LD="${LD-ld} -m elf32_sparc"
          ;;
      esac
      ;;
    *64-bit*)
      case $host in
        x86_64-*kfreebsd*-gnu)
          LD="${LD-ld} -m elf_x86_64_fbsd"
          ;;
        x86_64-*linux*)
          LD="${LD-ld} -m elf_x86_64"
          ;;
        powerpcle-*linux*)
          LD="${LD-ld} -m elf64lppc"
          ;;
        powerpc-*linux*)
          LD="${LD-ld} -m elf64ppc"
          ;;
        s390*-*linux*)
          LD="${LD-ld} -m elf64_s390"
          ;;
        sparc*-*linux*)
          LD="${LD-ld} -m elf64_sparc"
          ;;
      esac
      ;;
    esac
  fi
  rm -rf conftest*
  ;;

*-*-sco3.2v5*)
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  SAVE_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -belf"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
printf %s "checking whether the C compiler needs -belf... " >&6; }
if test ${lt_cv_cc_needs_belf+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  lt_cv_cc_needs_belf=yes
else case e in #(
  e) lt_cv_cc_needs_belf=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
    CFLAGS="$SAVE_CFLAGS"
  fi
  ;;
sparc*-*solaris*)
  # Find out which ABI we are using.
  echo 'int i;' > conftest.$ac_ext
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
    case `/usr/bin/file conftest.o` in
    *64-bit*)
      case $lt_cv_prog_gnu_ld in
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
      *)
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
	  LD="${LD-ld} -64"
	fi
	;;
      esac
      ;;
    esac
  fi
  rm -rf conftest*
  ;;


esac

need_locks="$enable_libtool_lock"




if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
    (test "X$CXX" != "Xg++"))) ; then
  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
printf %s "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
  if test ${ac_cv_prog_CXXCPP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)     # Double quotes because $CXX needs to be expanded
    for CXXCPP in "$CXX -E" cpp /lib/cpp
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
  break
fi

    done
    ac_cv_prog_CXXCPP=$CXXCPP
   ;;
esac
fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
printf "%s\n" "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :

else case e in #(
  e) # Broken: fails on valid input.
continue ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
  # Broken: success on invalid input.
continue
else case e in #(
  e) # Passes both tests.
ac_preproc_ok=:
break ;;
esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :

else case e in #(
  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See 'config.log' for more details" "$LINENO" 5; } ;;
esac
fi

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

fi


# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# find the maximum length of command line arguments
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
printf %s "checking the maximum length of command line arguments... " >&6; }
if test ${lt_cv_sys_max_cmd_len+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)   i=0
  teststring="ABCD"

  case $build_os in
  msdosdjgpp*)
    # On DJGPP, this test can blow up pretty badly due to problems in libc
    # (any single argument exceeding 2000 bytes causes a buffer overrun
    # during glob expansion).  Even if it were fixed, the result of this
    # check would be larger than it should be.
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
    ;;

  gnu*)
    # Under GNU Hurd, this test is not required because there is
    # no limit to the length of command line arguments.
    # Libtool will interpret -1 as no limit whatsoever
    lt_cv_sys_max_cmd_len=-1;
    ;;

  cygwin* | mingw*)
    # On Win9x/ME, this test blows up -- it succeeds, but takes
    # about 5 minutes as the teststring grows exponentially.
    # Worse, since 9x/ME are not pre-emptively multitasking,
    # you end up with a "frozen" computer, even though with patience
    # the test eventually succeeds (with a max line length of 256k).
    # Instead, let's just punt: use the minimum linelength reported by
    # all of the supported platforms: 8192 (on NT/2K/XP).
    lt_cv_sys_max_cmd_len=8192;
    ;;

  amigaos*)
    # On AmigaOS with pdksh, this test takes hours, literally.
    # So we just punt and use a minimum line length of 8192.
    lt_cv_sys_max_cmd_len=8192;
    ;;

  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
    # This has been around since 386BSD, at least.  Likely further.
    if test -x /sbin/sysctl; then
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
    elif test -x /usr/sbin/sysctl; then
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
    else
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
    fi
    # And add a safety zone
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
    ;;

  interix*)
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
    lt_cv_sys_max_cmd_len=196608
    ;;

  osf*)
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
    # nice to cause kernel panics so lets avoid the loop below.
    # First set a reasonable default.
    lt_cv_sys_max_cmd_len=16384
    #
    if test -x /sbin/sysconfig; then
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
      esac
    fi
    ;;
  sco3.2v5*)
    lt_cv_sys_max_cmd_len=102400
    ;;
  sysv5* | sco5v6* | sysv4.2uw2*)
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
    if test -n "$kargmax"; then
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ 	]//'`
    else
      lt_cv_sys_max_cmd_len=32768
    fi
    ;;
  *)
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
    if test -n "$lt_cv_sys_max_cmd_len"; then
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
    else
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
      while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
	       = "XX$teststring") >/dev/null 2>&1 &&
	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
	      lt_cv_sys_max_cmd_len=$new_result &&
	      test $i != 17 # 1/2 MB should be enough
      do
        i=`expr $i + 1`
        teststring=$teststring$teststring
      done
      teststring=
      # Add a significant safety factor because C++ compilers can tack on massive
      # amounts of additional arguments before passing them to the linker.
      # It appears as though 1/2 is a usable value.
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
    fi
    ;;
  esac
 ;;
esac
fi

if test -n $lt_cv_sys_max_cmd_len ; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
fi





# Check for command to grab the raw symbol name followed by C symbol from nm.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
printf %s "checking command to parse $NM output from $compiler object... " >&6; }
if test ${lt_cv_sys_global_symbol_pipe+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e)
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]

# Character class describing NM global symbol codes.
symcode='[BCDEGRST]'

# Regexp to match symbols that can be accessed directly from C.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'

# Transform an extracted symbol line into a proper C declaration
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"

# Transform an extracted symbol line into symbol name and symbol address
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"

# Define system-specific variables.
case $host_os in
aix*)
  symcode='[BCDT]'
  ;;
cygwin* | mingw* | pw32*)
  symcode='[ABCDGISTW]'
  ;;
hpux*) # Its linker distinguishes data from code symbols
  if test "$host_cpu" = ia64; then
    symcode='[ABCDEGRST]'
  fi
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
  ;;
linux* | k*bsd*-gnu)
  if test "$host_cpu" = ia64; then
    symcode='[ABCDGIRSTW]'
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
  fi
  ;;
irix* | nonstopux*)
  symcode='[BCDEGRST]'
  ;;
osf*)
  symcode='[BCDEGQRST]'
  ;;
solaris*)
  symcode='[BDRT]'
  ;;
sco3.2v5*)
  symcode='[DT]'
  ;;
sysv4.2uw2*)
  symcode='[DT]'
  ;;
sysv5* | sco5v6* | unixware* | OpenUNIX*)
  symcode='[ABDT]'
  ;;
sysv4)
  symcode='[DFNSTU]'
  ;;
esac

# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
mingw*)
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  ;;
esac

# If we're using GNU nm, then use its standard symbol codes.
case `$NM -V 2>&1` in
*GNU* | *'with BFD'*)
  symcode='[ABCDGIRSTW]' ;;
esac

# Try without a prefix undercore, then with it.
for ac_symprfx in "" "_"; do

  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  symxfrm="\\1 $ac_symprfx\\2 \\2"

  # Write the raw and C identifiers.
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"

  # Check to see that the pipe works correctly.
  pipe_works=no

  rm -f conftest*
  cat > conftest.$ac_ext <<EOF
#ifdef __cplusplus
extern "C" {
#endif
char nm_test_var;
void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
int main(void){nm_test_var='a';nm_test_func();return(0);}
EOF

  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
    # Now try to grab the symbols.
    nlist=conftest.nm
    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s "$nlist"; then
      # Try sorting and uniquifying the output.
      if sort "$nlist" | uniq > "$nlist"T; then
	mv -f "$nlist"T "$nlist"
      else
	rm -f "$nlist"T
      fi

      # Make sure that we snagged all the symbols we need.
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
	  cat <<EOF > conftest.$ac_ext
#ifdef __cplusplus
extern "C" {
#endif

EOF
	  # Now generate the symbol file.
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'

	  cat <<EOF >> conftest.$ac_ext
#if defined (__STDC__) && __STDC__
# define lt_ptr_t void *
#else
# define lt_ptr_t char *
# define const
#endif

/* The mapping between symbol names and symbols. */
const struct {
  const char *name;
  lt_ptr_t address;
}
lt_preloaded_symbols[] =
{
EOF
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
	  cat <<\EOF >> conftest.$ac_ext
  {0, (lt_ptr_t) 0}
};

#ifdef __cplusplus
}
#endif
EOF
	  # Now try linking the two files.
	  mv conftest.$ac_objext conftstm.$ac_objext
	  lt_save_LIBS="$LIBS"
	  lt_save_CFLAGS="$CFLAGS"
	  LIBS="conftstm.$ac_objext"
	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
	    pipe_works=yes
	  fi
	  LIBS="$lt_save_LIBS"
	  CFLAGS="$lt_save_CFLAGS"
	else
	  echo "cannot find nm_test_func in $nlist" >&5
	fi
      else
	echo "cannot find nm_test_var in $nlist" >&5
      fi
    else
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
    fi
  else
    echo "$progname: failed program was:" >&5
    cat conftest.$ac_ext >&5
  fi
  rm -rf conftest* conftst*

  # Do not use the global_symbol_pipe unless it works.
  if test "$pipe_works" = yes; then
    break
  else
    lt_cv_sys_global_symbol_pipe=
  fi
done
 ;;
esac
fi

if test -z "$lt_cv_sys_global_symbol_pipe"; then
  lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
printf "%s\n" "failed" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
printf "%s\n" "ok" >&6; }
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
printf %s "checking for objdir... " >&6; }
if test ${lt_cv_objdir+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
  lt_cv_objdir=.libs
else
  # MS-DOS does not allow filenames that begin with a dot.
  lt_cv_objdir=_libs
fi
rmdir .libs 2>/dev/null ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
printf "%s\n" "$lt_cv_objdir" >&6; }
objdir=$lt_cv_objdir





case $host_os in
aix3*)
  # AIX sometimes has problems with the GCC collect2 program.  For some
  # reason, if we set the COLLECT_NAMES environment variable, the problems
  # vanish in a puff of smoke.
  if test "X${COLLECT_NAMES+set}" != Xset; then
    COLLECT_NAMES=
    export COLLECT_NAMES
  fi
  ;;
esac

# Sed substitution that helps us do robust quoting.  It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed='sed -e 1s/^X//'
sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'

# Same as above, but do not quote variable references.
double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'

# Sed substitution to delay expansion of an escaped shell variable in a
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'

# Sed substitution to avoid accidental globbing in evaled expressions
no_glob_subst='s/\*/\\\*/g'

# Constants:
rm="rm -f"

# Global variables:
default_ofile=libtool
can_build_shared=yes

# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
ltmain="$ac_aux_dir/ltmain.sh"
ofile="$default_ofile"
with_gnu_ld="$lt_cv_prog_gnu_ld"

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AR+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="${ac_tool_prefix}ar"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
printf "%s\n" "$AR" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_AR"; then
  ac_ct_AR=$AR
  # Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_AR+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_AR"; then
  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_AR="ar"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
printf "%s\n" "$ac_ct_AR" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_AR" = x; then
    AR="false"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    AR=$ac_ct_AR
  fi
else
  AR="$ac_cv_prog_AR"
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_RANLIB+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
printf "%s\n" "$RANLIB" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_RANLIB+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_RANLIB="ranlib"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    RANLIB=$ac_ct_RANLIB
  fi
else
  RANLIB="$ac_cv_prog_RANLIB"
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_STRIP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
printf "%s\n" "$STRIP" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_STRIP"; then
  ac_ct_STRIP=$STRIP
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_STRIP+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_STRIP"; then
  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_STRIP="strip"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
printf "%s\n" "$ac_ct_STRIP" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_STRIP" = x; then
    STRIP=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    STRIP=$ac_ct_STRIP
  fi
else
  STRIP="$ac_cv_prog_STRIP"
fi


old_CC="$CC"
old_CFLAGS="$CFLAGS"

# Set sane defaults for various variables
test -z "$AR" && AR=ar
test -z "$AR_FLAGS" && AR_FLAGS=cru
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
test -z "$MAGIC_CMD" && MAGIC_CMD=file
test -z "$NM" && NM=nm
test -z "$SED" && SED=sed
test -z "$OBJDUMP" && OBJDUMP=objdump
test -z "$RANLIB" && RANLIB=:
test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o

# Determine commands to create old-style static archives.
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=

if test -n "$RANLIB"; then
  case $host_os in
  openbsd*)
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
    ;;
  *)
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
    ;;
  esac
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi

for cc_temp in $compiler""; do
  case $cc_temp in
    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
    \-*) ;;
    *) break;;
  esac
done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`


# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
printf %s "checking for ${ac_tool_prefix}file... " >&6; }
if test ${lt_cv_path_MAGIC_CMD+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $MAGIC_CMD in
[\\/*] |  ?:[\\/]*)
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  ;;
*)
  lt_save_MAGIC_CMD="$MAGIC_CMD"
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
  for ac_dir in $ac_dummy; do
    IFS="$lt_save_ifs"
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/${ac_tool_prefix}file; then
      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
      if test -n "$file_magic_test_file"; then
	case $deplibs_check_method in
	"file_magic "*)
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
	    $EGREP "$file_magic_regex" > /dev/null; then
	    :
	  else
	    cat <<EOF 1>&2

*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such.  This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem.  Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org

EOF
	  fi ;;
	esac
      fi
      break
    fi
  done
  IFS="$lt_save_ifs"
  MAGIC_CMD="$lt_save_MAGIC_CMD"
  ;;
esac ;;
esac
fi

MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
printf "%s\n" "$MAGIC_CMD" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

if test -z "$lt_cv_path_MAGIC_CMD"; then
  if test -n "$ac_tool_prefix"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
printf %s "checking for file... " >&6; }
if test ${lt_cv_path_MAGIC_CMD+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) case $MAGIC_CMD in
[\\/*] |  ?:[\\/]*)
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  ;;
*)
  lt_save_MAGIC_CMD="$MAGIC_CMD"
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
  for ac_dir in $ac_dummy; do
    IFS="$lt_save_ifs"
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/file; then
      lt_cv_path_MAGIC_CMD="$ac_dir/file"
      if test -n "$file_magic_test_file"; then
	case $deplibs_check_method in
	"file_magic "*)
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
	    $EGREP "$file_magic_regex" > /dev/null; then
	    :
	  else
	    cat <<EOF 1>&2

*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such.  This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem.  Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org

EOF
	  fi ;;
	esac
      fi
      break
    fi
  done
  IFS="$lt_save_ifs"
  MAGIC_CMD="$lt_save_MAGIC_CMD"
  ;;
esac ;;
esac
fi

MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
printf "%s\n" "$MAGIC_CMD" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  else
    MAGIC_CMD=:
  fi
fi

  fi
  ;;
esac


  case $host_os in
    rhapsody* | darwin*)
    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_DSYMUTIL+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$DSYMUTIL"; then
  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
DSYMUTIL=$ac_cv_prog_DSYMUTIL
if test -n "$DSYMUTIL"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
printf "%s\n" "$DSYMUTIL" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_DSYMUTIL"; then
  ac_ct_DSYMUTIL=$DSYMUTIL
  # Extract the first word of "dsymutil", so it can be a program name with args.
set dummy dsymutil; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_DSYMUTIL"; then
  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
if test -n "$ac_ct_DSYMUTIL"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_DSYMUTIL" = x; then
    DSYMUTIL=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    DSYMUTIL=$ac_ct_DSYMUTIL
  fi
else
  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
set dummy ${ac_tool_prefix}nmedit; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_NMEDIT+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$NMEDIT"; then
  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
NMEDIT=$ac_cv_prog_NMEDIT
if test -n "$NMEDIT"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
printf "%s\n" "$NMEDIT" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_NMEDIT"; then
  ac_ct_NMEDIT=$NMEDIT
  # Extract the first word of "nmedit", so it can be a program name with args.
set dummy nmedit; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_NMEDIT+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -n "$ac_ct_NMEDIT"; then
  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_NMEDIT="nmedit"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi ;;
esac
fi
ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
if test -n "$ac_ct_NMEDIT"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
printf "%s\n" "$ac_ct_NMEDIT" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_NMEDIT" = x; then
    NMEDIT=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    NMEDIT=$ac_ct_NMEDIT
  fi
else
  NMEDIT="$ac_cv_prog_NMEDIT"
fi


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
printf %s "checking for -single_module linker flag... " >&6; }
if test ${lt_cv_apple_cc_single_mod+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_apple_cc_single_mod=no
      if test -z "${LT_MULTI_MODULE}"; then
   # By default we will add the -single_module flag. You can override
   # by either setting the environment variable LT_MULTI_MODULE
   # non-empty at configure time, or by adding -multi_module to the
   # link flags.
   echo "int foo(void){return 1;}" > conftest.c
   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
     -dynamiclib ${wl}-single_module conftest.c
   if test -f libconftest.dylib; then
     lt_cv_apple_cc_single_mod=yes
     rm -rf libconftest.dylib*
   fi
   rm conftest.c
      fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
printf %s "checking for -exported_symbols_list linker flag... " >&6; }
if test ${lt_cv_ld_exported_symbols_list+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_ld_exported_symbols_list=no
      save_LDFLAGS=$LDFLAGS
      echo "_main" > conftest.sym
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"

cat > conftest.$ac_ext <<EOF
#line 87474 "configure"
#include "confdefs.h"
int main(void) {
; return 0; }
EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
 lt_cv_ld_exported_symbols_list=yes
  rm -rf conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&6
lt_cv_ld_exported_symbols_list=no
  rm -rf conftest*
fi
rm -f conftest*
   LDFLAGS="$save_LDFLAGS"
     ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
    case $host_os in
    rhapsody* | darwin1.[0123])
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
    darwin1.*)
     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
    darwin*)
      # if running on 10.5 or later, the deployment target defaults
      # to the OS version, if on x86, and 10.4, the deployment
      # target defaults to 10.4. Don't you love it?
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
   10.0,*86*-darwin8*|10.0,*-darwin[91]*)
     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
   10.[012]*)
     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
   *)
     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
      esac
    ;;
  esac
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
      _lt_dar_single_mod='$single_module'
    fi
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
    else
      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
    fi
    if test "$DSYMUTIL" != ":"; then
      _lt_dsymutil="~$DSYMUTIL \$lib || :"
    else
      _lt_dsymutil=
    fi
    ;;
  esac


enable_dlopen=no
enable_win32_dll=no

# Check whether --enable-libtool-lock was given.
if test ${enable_libtool_lock+y}
then :
  enableval=$enable_libtool_lock;
fi

test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes


# Check whether --with-pic was given.
if test ${with_pic+y}
then :
  withval=$with_pic; pic_mode="$withval"
else case e in #(
  e) pic_mode=default ;;
esac
fi

test -z "$pic_mode" && pic_mode=default

# Use C for the default configuration in the libtool script
tagname=
lt_save_CC="$CC"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


# Source file extension for C test sources.
ac_ext=c

# Object file extension for compiled C test sources.
objext=o
objext=$objext

# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"

# Code to be used in simple link tests
lt_simple_link_test_code='int main(void){return(0);}'


# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}

# If no C compiler flags were specified, use CFLAGS.
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}

# Allow CC to be a program name with arguments.
compiler=$CC


# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*

ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm -r conftest*


## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
## the running order or otherwise move them around unless you know exactly
## what you are doing...

lt_prog_compiler_no_builtin_flag=

if test "$GCC" = yes; then
  lt_prog_compiler_no_builtin_flag=' -fno-builtin'


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
if test ${lt_cv_prog_compiler_rtti_exceptions+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_prog_compiler_rtti_exceptions=no
  ac_outfile=conftest.$ac_objext
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
   lt_compiler_flag="-fno-rtti -fno-exceptions"
   # Insert the option either (1) after the last *FLAGS variable, or
   # (2) before a word containing "conftest.", or (3) at the end.
   # Note that $ac_compile itself does not contain backslashes and begins
   # with a dollar sign (not a hyphen), so the echo should work correctly.
   # The option is referenced via a variable to avoid confusing sed.
   lt_compile=`echo "$ac_compile" | $SED \
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   -e 's:$: $lt_compiler_flag:'`
   (eval echo "\"configure:87636: $lt_compile\"" >&5)
   (eval "$lt_compile" 2>conftest.err)
   ac_status=$?
   cat conftest.err >&5
   echo "configure:87640: \$? = $ac_status" >&5
   if (exit $ac_status) && test -s "$ac_outfile"; then
     # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings other than the usual output.
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
       lt_cv_prog_compiler_rtti_exceptions=yes
     fi
   fi
   $rm conftest*
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }

if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
    :
fi

fi

lt_prog_compiler_wl=
lt_prog_compiler_pic=
lt_prog_compiler_static=

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
printf %s "checking for $compiler option to produce PIC... " >&6; }

  if test "$GCC" = yes; then
    lt_prog_compiler_wl='-Wl,'
    lt_prog_compiler_static='-static'

    case $host_os in
      aix*)
      # All AIX code is PIC.
      if test "$host_cpu" = ia64; then
	# AIX 5 now supports IA64 processor
	lt_prog_compiler_static='-Bstatic'
      fi
      ;;

    amigaos*)
      # FIXME: we need at least 68020 code to build shared libraries, but
      # adding the `-m68020' flag to GCC prevents building anything better,
      # like `-m68040'.
      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
      ;;

    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;

    mingw* | cygwin* | pw32* | os2*)
      # This hack is so that the source file can tell whether it is being
      # built for inclusion in a dll (and should export symbols for example).
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
      # (--disable-auto-import) libraries
	  lt_prog_compiler_pic='-DDLL_EXPORT'
      ;;

    darwin* | rhapsody*)
      # PIC is the default on this platform
      # Common symbols not allowed in MH_DYLIB files
      lt_prog_compiler_pic='-fno-common'
      ;;

    interix[3-9]*)
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
      # Instead, we relocate shared libraries at runtime.
      ;;

    msdosdjgpp*)
      # Just because we use GCC doesn't mean we suddenly get shared libraries
      # on systems that don't support them.
      lt_prog_compiler_can_build_shared=no
      enable_shared=no
      ;;

    sysv4*MP*)
      if test -d /usr/nec; then
	lt_prog_compiler_pic=-Kconform_pic
      fi
      ;;

    hpux*)
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
      # not for PA HP-UX.
      case $host_cpu in
      hppa*64*|ia64*)
	# +Z the default
	;;
      *)
	lt_prog_compiler_pic='-fPIC'
	;;
      esac
      ;;

    *)
      lt_prog_compiler_pic='-fPIC'
      ;;
    esac
  else
    # PORTME Check for flag to pass linker flags through the system compiler.
    case $host_os in
    aix*)
      lt_prog_compiler_wl='-Wl,'
      if test "$host_cpu" = ia64; then
	# AIX 5 now supports IA64 processor
	lt_prog_compiler_static='-Bstatic'
      else
	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
      fi
      ;;
      darwin*)
        # PIC is the default on this platform
        # Common symbols not allowed in MH_DYLIB files
       case $cc_basename in
         xlc*)
         lt_prog_compiler_pic='-qnocommon'
         lt_prog_compiler_wl='-Wl,'
         ;;
       esac
       ;;

    mingw* | cygwin* | pw32* | os2*)
      # This hack is so that the source file can tell whether it is being
      # built for inclusion in a dll (and should export symbols for example).
	  lt_prog_compiler_pic='-DDLL_EXPORT'
      ;;

    hpux9* | hpux10* | hpux11*)
      lt_prog_compiler_wl='-Wl,'
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
      # not for PA HP-UX.
      case $host_cpu in
      hppa*64*|ia64*)
	# +Z the default
	;;
      *)
	lt_prog_compiler_pic='+Z'
	;;
      esac
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
      lt_prog_compiler_static='${wl}-a ${wl}archive'
      ;;

    irix5* | irix6* | nonstopux*)
      lt_prog_compiler_wl='-Wl,'
      # PIC (with -KPIC) is the default.
      lt_prog_compiler_static='-non_shared'
      ;;

    newsos6)
      lt_prog_compiler_pic='-KPIC'
      lt_prog_compiler_static='-Bstatic'
      ;;

    linux* | k*bsd*-gnu)
      case $cc_basename in
      # old Intel for x86_64 which still supported -KPIC.
      ecc*)
        lt_prog_compiler_wl='-Wl,'
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-static'
        ;;
      # icc used to be incompatible with GCC.
      # ICC 10 doesn't accept -KPIC any more.
      icc*)
        lt_prog_compiler_wl='-Wl,'
        lt_prog_compiler_pic='-fPIC'
        lt_prog_compiler_static='-static'
        ;;
      pgcc* | pgf77* | pgf90* | pgf95*)
        # Portland Group compilers (*not* the Pentium gcc compiler,
	# which looks to be a dead project)
	lt_prog_compiler_wl='-Wl,'
	lt_prog_compiler_pic='-fpic'
	lt_prog_compiler_static='-Bstatic'
        ;;
      ccc*)
        lt_prog_compiler_wl='-Wl,'
        # All Alpha code is PIC.
        lt_prog_compiler_static='-non_shared'
        ;;
      *)
        case `$CC -V 2>&1 | sed 5q` in
	*Sun\ C*)
	  # Sun C 5.9
	  lt_prog_compiler_pic='-KPIC'
	  lt_prog_compiler_static='-Bstatic'
	  lt_prog_compiler_wl='-Wl,'
	  ;;
	*Sun\ F*)
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
	  lt_prog_compiler_pic='-KPIC'
	  lt_prog_compiler_static='-Bstatic'
	  lt_prog_compiler_wl=''
	  ;;
	esac
	;;
      esac
      ;;

    osf3* | osf4* | osf5*)
      lt_prog_compiler_wl='-Wl,'
      # All OSF/1 code is PIC.
      lt_prog_compiler_static='-non_shared'
      ;;

    rdos*)
      lt_prog_compiler_static='-non_shared'
      ;;

    solaris*)
      lt_prog_compiler_pic='-KPIC'
      lt_prog_compiler_static='-Bstatic'
      case $cc_basename in
      f77* | f90* | f95*)
	lt_prog_compiler_wl='-Qoption ld ';;
      *)
	lt_prog_compiler_wl='-Wl,';;
      esac
      ;;

    sunos4*)
      lt_prog_compiler_wl='-Qoption ld '
      lt_prog_compiler_pic='-PIC'
      lt_prog_compiler_static='-Bstatic'
      ;;

    sysv4 | sysv4.2uw2* | sysv4.3*)
      lt_prog_compiler_wl='-Wl,'
      lt_prog_compiler_pic='-KPIC'
      lt_prog_compiler_static='-Bstatic'
      ;;

    sysv4*MP*)
      if test -d /usr/nec ;then
	lt_prog_compiler_pic='-Kconform_pic'
	lt_prog_compiler_static='-Bstatic'
      fi
      ;;

    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
      lt_prog_compiler_wl='-Wl,'
      lt_prog_compiler_pic='-KPIC'
      lt_prog_compiler_static='-Bstatic'
      ;;

    unicos*)
      lt_prog_compiler_wl='-Wl,'
      lt_prog_compiler_can_build_shared=no
      ;;

    uts4*)
      lt_prog_compiler_pic='-pic'
      lt_prog_compiler_static='-Bstatic'
      ;;

    *)
      lt_prog_compiler_can_build_shared=no
      ;;
    esac
  fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
printf "%s\n" "$lt_prog_compiler_pic" >&6; }

#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
if test ${lt_cv_prog_compiler_pic_works+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_prog_compiler_pic_works=no
  ac_outfile=conftest.$ac_objext
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
   # Insert the option either (1) after the last *FLAGS variable, or
   # (2) before a word containing "conftest.", or (3) at the end.
   # Note that $ac_compile itself does not contain backslashes and begins
   # with a dollar sign (not a hyphen), so the echo should work correctly.
   # The option is referenced via a variable to avoid confusing sed.
   lt_compile=`echo "$ac_compile" | $SED \
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   -e 's:$: $lt_compiler_flag:'`
   (eval echo "\"configure:87936: $lt_compile\"" >&5)
   (eval "$lt_compile" 2>conftest.err)
   ac_status=$?
   cat conftest.err >&5
   echo "configure:87940: \$? = $ac_status" >&5
   if (exit $ac_status) && test -s "$ac_outfile"; then
     # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings other than the usual output.
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
       lt_cv_prog_compiler_pic_works=yes
     fi
   fi
   $rm conftest*
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }

if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
    case $lt_prog_compiler_pic in
     "" | " "*) ;;
     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
     esac
else
    lt_prog_compiler_pic=
     lt_prog_compiler_can_build_shared=no
fi

fi
case $host_os in
  # For platforms which do not support PIC, -DPIC is meaningless:
  *djgpp*)
    lt_prog_compiler_pic=
    ;;
  *)
    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
    ;;
esac

#
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
if test ${lt_cv_prog_compiler_static_works+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_prog_compiler_static_works=no
   save_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
     # The linker can only warn and ignore the option if not recognized
     # So say no if there are warnings
     if test -s conftest.err; then
       # Append any errors to the config.log.
       cat conftest.err 1>&5
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
       if diff conftest.exp conftest.er2 >/dev/null; then
         lt_cv_prog_compiler_static_works=yes
       fi
     else
       lt_cv_prog_compiler_static_works=yes
     fi
   fi
   $rm -r conftest*
   LDFLAGS="$save_LDFLAGS"
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }

if test x"$lt_cv_prog_compiler_static_works" = xyes; then
    :
else
    lt_prog_compiler_static=
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_prog_compiler_c_o=no
   $rm -r conftest 2>/dev/null
   mkdir conftest
   cd conftest
   mkdir out
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext

   lt_compiler_flag="-o out/conftest2.$ac_objext"
   # Insert the option either (1) after the last *FLAGS variable, or
   # (2) before a word containing "conftest.", or (3) at the end.
   # Note that $ac_compile itself does not contain backslashes and begins
   # with a dollar sign (not a hyphen), so the echo should work correctly.
   lt_compile=`echo "$ac_compile" | $SED \
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   -e 's:$: $lt_compiler_flag:'`
   (eval echo "\"configure:88044: $lt_compile\"" >&5)
   (eval "$lt_compile" 2>out/conftest.err)
   ac_status=$?
   cat out/conftest.err >&5
   echo "configure:88048: \$? = $ac_status" >&5
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
   then
     # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
       lt_cv_prog_compiler_c_o=yes
     fi
   fi
   chmod u+w . 2>&5
   $rm conftest*
   # SGI C++ compiler will create directory out/ii_files/ for
   # template instantiation
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
   $rm out/* && rmdir out
   cd ..
   rmdir conftest
   $rm conftest*
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }


hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
  # do not overwrite the value of need_locks provided by the user
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
printf %s "checking if we can lock with hard links... " >&6; }
  hard_links=yes
  $rm conftest*
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
  touch conftest.a
  ln conftest.a conftest.b 2>&5 || hard_links=no
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
printf "%s\n" "$hard_links" >&6; }
  if test "$hard_links" = no; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
    need_locks=warn
  fi
else
  need_locks=no
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }

  runpath_var=
  allow_undefined_flag=
  enable_shared_with_static_runtimes=no
  archive_cmds=
  archive_expsym_cmds=
  old_archive_From_new_cmds=
  old_archive_from_expsyms_cmds=
  export_dynamic_flag_spec=
  whole_archive_flag_spec=
  thread_safe_flag_spec=
  hardcode_libdir_flag_spec=
  hardcode_libdir_flag_spec_ld=
  hardcode_libdir_separator=
  hardcode_direct=no
  hardcode_minus_L=no
  hardcode_shlibpath_var=unsupported
  link_all_deplibs=unknown
  hardcode_automatic=no
  module_cmds=
  module_expsym_cmds=
  always_export_symbols=no
  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  # include_expsyms should be a list of space-separated symbols to be *always*
  # included in the symbol list
  include_expsyms=
  # exclude_expsyms can be an extended regexp of symbols to exclude
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  # as well as any symbol that contains `d'.
  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  # platforms (ab)use it in PIC code, but their linkers get confused if
  # the symbol is explicitly referenced.  Since portable code cannot
  # rely on this symbol name, it's probably fine to never include it in
  # preloaded symbol tables.
  # Exclude shared library initialization/finalization symbols.
  extract_expsyms_cmds=
  # Just being paranoid about ensuring that cc_basename is set.
  for cc_temp in $compiler""; do
  case $cc_temp in
    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
    \-*) ;;
    *) break;;
  esac
done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`

  case $host_os in
  cygwin* | mingw* | pw32*)
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
    # When not using gcc, we currently assume that we are using
    # Microsoft Visual C++.
    if test "$GCC" != yes; then
      with_gnu_ld=no
    fi
    ;;
  interix*)
    # we just hope/assume this is gcc and not c89 (= MSVC++)
    with_gnu_ld=yes
    ;;
  openbsd*)
    with_gnu_ld=no
    ;;
  esac

  ld_shlibs=yes
  if test "$with_gnu_ld" = yes; then
    # If archive_cmds runs LD, not CC, wlarc should be empty
    wlarc='${wl}'

    # Set some defaults for GNU ld with shared library support. These
    # are reset later if shared libraries are not supported. Putting them
    # here allows them to be overridden if necessary.
    runpath_var=LD_RUN_PATH
    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
    export_dynamic_flag_spec='${wl}--export-dynamic'
    # ancient GNU ld didn't support --whole-archive et. al.
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
      else
  	whole_archive_flag_spec=
    fi
    supports_anon_versioning=no
    case `$LD -v 2>/dev/null` in
      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
      *\ 2.11.*) ;; # other 2.11 versions
      *) supports_anon_versioning=yes ;;
    esac

    # See if GNU ld supports shared libraries.
    case $host_os in
    aix[3-9]*)
      # On AIX/PPC, the GNU linker is very broken
      if test "$host_cpu" != ia64; then
	ld_shlibs=no
	cat <<EOF 1>&2

*** Warning: the GNU linker, at least up to release 2.9.1, is reported
*** to be unable to reliably create shared libraries on AIX.
*** Therefore, libtool is disabling shared libraries support.  If you
*** really care for shared libraries, you may want to modify your PATH
*** so that a non-GNU linker is found, and then restart.

EOF
      fi
      ;;

    amigaos*)
      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_minus_L=yes

      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
      # that the semantics of dynamic libraries on AmigaOS, at least up
      # to version 4, is to share data among multiple programs linked
      # with the same dynamic library.  Since this doesn't match the
      # behavior of shared libraries on other platforms, we can't use
      # them.
      ld_shlibs=no
      ;;

    beos*)
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
	allow_undefined_flag=unsupported
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
	# support --undefined.  This deserves some investigation.  FIXME
	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      else
	ld_shlibs=no
      fi
      ;;

    cygwin* | mingw* | pw32*)
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
      # as there is no search path for DLLs.
      hardcode_libdir_flag_spec='-L$libdir'
      allow_undefined_flag=unsupported
      always_export_symbols=no
      enable_shared_with_static_runtimes=yes
      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'

      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
	# If the export-symbols file already is a .def file (1st line
	# is EXPORTS), use it as is; otherwise, prepend...
	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
	  cp $export_symbols $output_objdir/$soname.def;
	else
	  echo EXPORTS > $output_objdir/$soname.def;
	  cat $export_symbols >> $output_objdir/$soname.def;
	fi~
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
      else
	ld_shlibs=no
      fi
      ;;

    interix[3-9]*)
      hardcode_direct=no
      hardcode_shlibpath_var=no
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
      export_dynamic_flag_spec='${wl}-E'
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
      # Instead, shared libraries are loaded at an image base (0x10000000 by
      # default) and relocated if they conflict, which is a slow very memory
      # consuming and fragmenting process.  To avoid this, we pick a random,
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
      ;;

    gnu* | linux* | k*bsd*-gnu)
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
	tmp_addflag=
	case $cc_basename,$host_cpu in
	pgcc*)				# Portland Group C compiler
	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
	  tmp_addflag=' $pic_flag'
	  ;;
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
	  tmp_addflag=' $pic_flag -Mnomain' ;;
	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
	  tmp_addflag=' -i_dynamic' ;;
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
	ifc* | ifort*)			# Intel Fortran compiler
	  tmp_addflag=' -nofor_main' ;;
	esac
	case `$CC -V 2>&1 | sed 5q` in
	*Sun\ C*)			# Sun C 5.9
	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
	  tmp_sharedflag='-G' ;;
	*Sun\ F*)			# Sun Fortran 8.3
	  tmp_sharedflag='-G' ;;
	*)
	  tmp_sharedflag='-shared' ;;
	esac
	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'

	if test $supports_anon_versioning = yes; then
	  archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  $echo "local: *; };" >> $output_objdir/$libname.ver~
	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
	fi
      else
	ld_shlibs=no
      fi
      ;;

    netbsd*)
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
	wlarc=
      else
	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
      fi
      ;;

    solaris*)
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
	ld_shlibs=no
	cat <<EOF 1>&2

*** Warning: The releases 2.8.* of the GNU linker cannot reliably
*** create shared libraries on Solaris systems.  Therefore, libtool
*** is disabling shared libraries support.  We urge you to upgrade GNU
*** binutils to release 2.9.1 or newer.  Another option is to modify
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.

EOF
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
      else
	ld_shlibs=no
      fi
      ;;

    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
      case `$LD -v 2>&1` in
        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
	ld_shlibs=no
	cat <<_LT_EOF 1>&2

*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
*** reliably create shared libraries on SCO systems.  Therefore, libtool
*** is disabling shared libraries support.  We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.

_LT_EOF
	;;
	*)
	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
	    hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
	  else
	    ld_shlibs=no
	  fi
	;;
      esac
      ;;

    sunos4*)
      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
      wlarc=
      hardcode_direct=yes
      hardcode_shlibpath_var=no
      ;;

    *)
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
      else
	ld_shlibs=no
      fi
      ;;
    esac

    if test "$ld_shlibs" = no; then
      runpath_var=
      hardcode_libdir_flag_spec=
      export_dynamic_flag_spec=
      whole_archive_flag_spec=
    fi
  else
    # PORTME fill in a description of your system's linker (not GNU ld)
    case $host_os in
    aix3*)
      allow_undefined_flag=unsupported
      always_export_symbols=yes
      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
      # Note: this linker hardcodes the directories in LIBPATH if there
      # are no directories specified by -L.
      hardcode_minus_L=yes
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
	# Neither direct hardcoding nor static linking is supported with a
	# broken collect2.
	hardcode_direct=unsupported
      fi
      ;;

    aix[4-9]*)
      if test "$host_cpu" = ia64; then
	# On IA64, the linker does run time linking by default, so we don't
	# have to do anything special.
	aix_use_runtimelinking=no
	exp_sym_flag='-Bexport'
	no_entry_flag=""
      else
	# If we're using GNU nm, then we don't want the "-C" option.
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
	else
	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
	fi
	aix_use_runtimelinking=no

	# Test if we are trying to use run time linking or normal
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
	# need to do runtime linking.
	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
	  for ld_flag in $LDFLAGS; do
  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  	    aix_use_runtimelinking=yes
  	    break
  	  fi
	  done
	  ;;
	esac

	exp_sym_flag='-bexport'
	no_entry_flag='-bnoentry'
      fi

      # When large executables or shared objects are built, AIX ld can
      # have problems creating the table of contents.  If linking a library
      # or program results in "error TOC overflow" add -mminimal-toc to
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.

      archive_cmds=''
      hardcode_direct=yes
      hardcode_libdir_separator=':'
      link_all_deplibs=yes

      if test "$GCC" = yes; then
	case $host_os in aix4.[012]|aix4.[012].*)
	# We only want to do this on AIX 4.2 and lower, the check
	# below for broken collect2 doesn't work under 4.3+
	  collect2name=`${CC} -print-prog-name=collect2`
	  if test -f "$collect2name" && \
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
	  then
  	  # We have reworked collect2
  	  :
	  else
  	  # We have old collect2
  	  hardcode_direct=unsupported
  	  # It fails to find uninstalled libraries when the uninstalled
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
  	  # to unsupported forces relinking
  	  hardcode_minus_L=yes
  	  hardcode_libdir_flag_spec='-L$libdir'
  	  hardcode_libdir_separator=
	  fi
	  ;;
	esac
	shared_flag='-shared'
	if test "$aix_use_runtimelinking" = yes; then
	  shared_flag="$shared_flag "'${wl}-G'
	fi
      else
	# not using gcc
	if test "$host_cpu" = ia64; then
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  	# chokes on -Wl,-G. The following line is correct:
	  shared_flag='-G'
	else
	  if test "$aix_use_runtimelinking" = yes; then
	    shared_flag='${wl}-G'
	  else
	    shared_flag='${wl}-bM:SRE'
	  fi
	fi
      fi

      # It seems that -bexpall does not export symbols beginning with
      # underscore (_), so it is better to generate a list of symbols to export.
      always_export_symbols=yes
      if test "$aix_use_runtimelinking" = yes; then
	# Warning - without using the other runtime loading flags (-brtl),
	# -berok will link without error, but may produce a broken library.
	allow_undefined_flag='-berok'
       # Determine the default libpath from the value encoded in an empty executable.

cat > conftest.$ac_ext <<EOF
#line 88509 "configure"
#include "confdefs.h"
int main(void) {
; return 0; }
EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext}; then

lt_aix_libpath_sed='
    /Import File Strings/,/^$/ {
	/^0/ {
	    s/^0  *\(.*\)$/\1/
	    p
	}
    }'
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
if test -z "$aix_libpath"; then
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
  rm -rf conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&6
fi
rm -f conftest*
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi

       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
	if test "$host_cpu" = ia64; then
	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
	  allow_undefined_flag="-z nodefs"
	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
	else
	 # Determine the default libpath from the value encoded in an empty executable.

cat > conftest.$ac_ext <<EOF
#line 88551 "configure"
#include "confdefs.h"
int main(void) {
; return 0; }
EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext}; then

lt_aix_libpath_sed='
    /Import File Strings/,/^$/ {
	/^0/ {
	    s/^0  *\(.*\)$/\1/
	    p
	}
    }'
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
if test -z "$aix_libpath"; then
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
  rm -rf conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&6
fi
rm -f conftest*
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi

	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
	  # Warning - without using the other run time loading flags,
	  # -berok will link without error, but may produce a broken library.
	  no_undefined_flag=' ${wl}-bernotok'
	  allow_undefined_flag=' ${wl}-berok'
	  # Exported symbols can be pulled into shared objects from archives
	  whole_archive_flag_spec='$convenience'
	  archive_cmds_need_lc=yes
	  # This is similar to how AIX traditionally builds its shared libraries.
	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
	fi
      fi
      ;;

    amigaos*)
      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_minus_L=yes
      # see comment about different semantics on the GNU ld section
      ld_shlibs=no
      ;;

    bsdi[45]*)
      export_dynamic_flag_spec=-rdynamic
      ;;

    cygwin* | mingw* | pw32*)
      # When not using gcc, we currently assume that we are using
      # Microsoft Visual C++.
      # hardcode_libdir_flag_spec is actually meaningless, as there is
      # no search path for DLLs.
      hardcode_libdir_flag_spec=' '
      allow_undefined_flag=unsupported
      # Tell ltmain to make .lib files, not .a files.
      libext=lib
      # Tell ltmain to make .dll files, not .so files.
      shrext_cmds=".dll"
      # FIXME: Setting linknames here is a bad hack.
      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
      # The linker will automatically build a .lib file if we build a DLL.
      old_archive_From_new_cmds='true'
      # FIXME: Should let the user specify the lib program.
      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
      fix_srcfile_path='`cygpath -w "$srcfile"`'
      enable_shared_with_static_runtimes=yes
      ;;

    darwin* | rhapsody*)
      case $host_os in
        rhapsody* | darwin1.[012])
         allow_undefined_flag='${wl}-undefined ${wl}suppress'
         ;;
       *) # Darwin 1.3 on
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
         else
           case ${MACOSX_DEPLOYMENT_TARGET} in
             10.[012])
               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
               ;;
             *)
               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
               ;;
           esac
         fi
         ;;
      esac
      archive_cmds_need_lc=no
      hardcode_direct=no
      hardcode_automatic=yes
      hardcode_shlibpath_var=unsupported
      whole_archive_flag_spec=''
      link_all_deplibs=yes
    if test "$GCC" = yes ; then
    	output_verbose_link_cmd='echo'
        archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
        module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
        archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
        module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
    else
      case $cc_basename in
        xlc*)
         output_verbose_link_cmd='echo'
         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
          ;;
       *)
         ld_shlibs=no
          ;;
      esac
    fi
      ;;

    dgux*)
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_shlibpath_var=no
      ;;

    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
    # support.  Future versions do this automatically, but an explicit c++rt0.o
    # does not break anything, and helps significantly (at the cost of a little
    # extra space).
    freebsd2.2*)
      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
      hardcode_libdir_flag_spec='-R$libdir'
      hardcode_direct=yes
      hardcode_shlibpath_var=no
      ;;

    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
    freebsd2*)
      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
      hardcode_direct=yes
      hardcode_minus_L=yes
      hardcode_shlibpath_var=no
      ;;

    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
    freebsd* | dragonfly*)
      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
      hardcode_libdir_flag_spec='-R$libdir'
      hardcode_direct=yes
      hardcode_shlibpath_var=no
      ;;

    hpux9*)
      if test "$GCC" = yes; then
	archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
      else
	archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
      fi
      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
      hardcode_libdir_separator=:
      hardcode_direct=yes

      # hardcode_minus_L: Not really in the search PATH,
      # but as the default location of the library.
      hardcode_minus_L=yes
      export_dynamic_flag_spec='${wl}-E'
      ;;

    hpux10*)
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
      else
	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
      fi
      if test "$with_gnu_ld" = no; then
	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
	hardcode_libdir_separator=:

	hardcode_direct=yes
	export_dynamic_flag_spec='${wl}-E'

	# hardcode_minus_L: Not really in the search PATH,
	# but as the default location of the library.
	hardcode_minus_L=yes
      fi
      ;;

    hpux11*)
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
	case $host_cpu in
	hppa*64*)
	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
	  ;;
	ia64*)
	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
	  ;;
	*)
	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
	  ;;
	esac
      else
	case $host_cpu in
	hppa*64*)
	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
	  ;;
	ia64*)
	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
	  ;;
	*)
	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
	  ;;
	esac
      fi
      if test "$with_gnu_ld" = no; then
	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
	hardcode_libdir_separator=:

	case $host_cpu in
	hppa*64*|ia64*)
	  hardcode_libdir_flag_spec_ld='+b $libdir'
	  hardcode_direct=no
	  hardcode_shlibpath_var=no
	  ;;
	*)
	  hardcode_direct=yes
	  export_dynamic_flag_spec='${wl}-E'

	  # hardcode_minus_L: Not really in the search PATH,
	  # but as the default location of the library.
	  hardcode_minus_L=yes
	  ;;
	esac
      fi
      ;;

    irix5* | irix6* | nonstopux*)
      if test "$GCC" = yes; then
	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
      else
	archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
	hardcode_libdir_flag_spec_ld='-rpath $libdir'
      fi
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      hardcode_libdir_separator=:
      link_all_deplibs=yes
      ;;

    netbsd*)
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
      else
	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
      fi
      hardcode_libdir_flag_spec='-R$libdir'
      hardcode_direct=yes
      hardcode_shlibpath_var=no
      ;;

    newsos6)
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
      hardcode_direct=yes
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      hardcode_libdir_separator=:
      hardcode_shlibpath_var=no
      ;;

    openbsd*)
      if test -f /usr/libexec/ld.so; then
	hardcode_direct=yes
	hardcode_shlibpath_var=no
	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
	  export_dynamic_flag_spec='${wl}-E'
	else
	  case $host_os in
	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
	     hardcode_libdir_flag_spec='-R$libdir'
	     ;;
	   *)
	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
	     ;;
	  esac
        fi
      else
	ld_shlibs=no
      fi
      ;;

    os2*)
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_minus_L=yes
      allow_undefined_flag=unsupported
      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
      ;;

    osf3*)
      if test "$GCC" = yes; then
	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
      else
	allow_undefined_flag=' -expect_unresolved \*'
	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
      fi
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      hardcode_libdir_separator=:
      ;;

    osf4* | osf5*)	# as osf3* with the addition of -msym flag
      if test "$GCC" = yes; then
	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      else
	allow_undefined_flag=' -expect_unresolved \*'
	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'

	# Both c and cxx compiler support -rpath directly
	hardcode_libdir_flag_spec='-rpath $libdir'
      fi
      hardcode_libdir_separator=:
      ;;

    solaris*)
      no_undefined_flag=' -z text'
      if test "$GCC" = yes; then
	wlarc='${wl}'
	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
      else
	wlarc=''
	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
      fi
      hardcode_libdir_flag_spec='-R$libdir'
      hardcode_shlibpath_var=no
      case $host_os in
      solaris2.[0-5] | solaris2.[0-5].*) ;;
      *)
	# The compiler driver will combine and reorder linker options,
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
	if test "$GCC" = yes; then
	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
	else
	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
	fi
	;;
      esac
      link_all_deplibs=yes
      ;;

    sunos4*)
      if test "x$host_vendor" = xsequent; then
	# Use $CC to link under sequent, because it throws in some extra .o
	# files that make .init and .fini sections work.
	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
      else
	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
      fi
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_direct=yes
      hardcode_minus_L=yes
      hardcode_shlibpath_var=no
      ;;

    sysv4)
      case $host_vendor in
	sni)
	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
	  hardcode_direct=yes # is this really true???
	;;
	siemens)
	  ## LD is ld it makes a PLAMLIB
	  ## CC just makes a GrossModule.
	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
	  reload_cmds='$CC -r -o $output$reload_objs'
	  hardcode_direct=no
        ;;
	motorola)
	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
	;;
      esac
      runpath_var='LD_RUN_PATH'
      hardcode_shlibpath_var=no
      ;;

    sysv4.3*)
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
      hardcode_shlibpath_var=no
      export_dynamic_flag_spec='-Bexport'
      ;;

    sysv4*MP*)
      if test -d /usr/nec; then
	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
	hardcode_shlibpath_var=no
	runpath_var=LD_RUN_PATH
	hardcode_runpath_var=yes
	ld_shlibs=yes
      fi
      ;;

    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
      no_undefined_flag='${wl}-z,text'
      archive_cmds_need_lc=no
      hardcode_shlibpath_var=no
      runpath_var='LD_RUN_PATH'

      if test "$GCC" = yes; then
	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
      else
	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
      fi
      ;;

    sysv5* | sco3.2v5* | sco5v6*)
      # Note: We can NOT use -z defs as we might desire, because we do not
      # link with -lc, and that would cause any symbols used from libc to
      # always be unresolved, which means just about no library would
      # ever link correctly.  If we're not using GNU ld we use -z text
      # though, which does catch some bad symbols but isn't as heavy-handed
      # as -z defs.
      no_undefined_flag='${wl}-z,text'
      allow_undefined_flag='${wl}-z,nodefs'
      archive_cmds_need_lc=no
      hardcode_shlibpath_var=no
      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
      hardcode_libdir_separator=':'
      link_all_deplibs=yes
      export_dynamic_flag_spec='${wl}-Bexport'
      runpath_var='LD_RUN_PATH'

      if test "$GCC" = yes; then
	archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
      else
	archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
      fi
      ;;

    uts4*)
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_shlibpath_var=no
      ;;

    *)
      ld_shlibs=no
      ;;
    esac
  fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
printf "%s\n" "$ld_shlibs" >&6; }
test "$ld_shlibs" = no && can_build_shared=no

#
# Do we need to explicitly link libc?
#
case "x$archive_cmds_need_lc" in
x|xyes)
  # Assume -lc should be added
  archive_cmds_need_lc=yes

  if test "$enable_shared" = yes && test "$GCC" = yes; then
    case $archive_cmds in
    *'~'*)
      # FIXME: we may have to deal with multi-command sequences.
      ;;
    '$CC '*)
      # Test whether the compiler implicitly links with -lc since on some
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
      # to ld, don't add -lc before -lgcc.
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
printf %s "checking whether -lc should be explicitly linked in... " >&6; }
      $rm conftest*
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext

      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } 2>conftest.err; then
        soname=conftest
        lib=conftest
        libobjs=conftest.$ac_objext
        deplibs=
        wl=$lt_prog_compiler_wl
	pic_flag=$lt_prog_compiler_pic
        compiler_flags=-v
        linker_flags=-v
        verstring=
        output_objdir=.
        libname=conftest
        lt_save_allow_undefined_flag=$allow_undefined_flag
        allow_undefined_flag=
        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
        then
	  archive_cmds_need_lc=no
        else
	  archive_cmds_need_lc=yes
        fi
        allow_undefined_flag=$lt_save_allow_undefined_flag
      else
        cat conftest.err 1>&5
      fi
      $rm conftest*
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
printf "%s\n" "$archive_cmds_need_lc" >&6; }
      ;;
    esac
  fi
  ;;
esac

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
printf %s "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
finish_eval=
shlibpath_var=
shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"

if test "$GCC" = yes; then
  case $host_os in
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
    *) lt_awk_arg="/^libraries:/" ;;
  esac
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
    # if the path contains ";" then we assume it to be the separator
    # otherwise default to the standard path separator (i.e. ":") - it is
    # assumed that no part of a normal pathname contains ";" but that should
    # okay in the real world where ";" in dirpaths is itself problematic.
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
  else
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
  fi
  # Ok, now we have the path, separated by spaces, we can step through it
  # and add multilib dir if necessary.
  lt_tmp_lt_search_path_spec=
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  for lt_sys_path in $lt_search_path_spec; do
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
    else
      test -d "$lt_sys_path" && \
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
    fi
  done
  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
BEGIN {RS=" "; FS="/|\n";} {
  lt_foo="";
  lt_count=0;
  for (lt_i = NF; lt_i > 0; lt_i--) {
    if ($lt_i != "" && $lt_i != ".") {
      if ($lt_i == "..") {
        lt_count++;
      } else {
        if (lt_count == 0) {
          lt_foo="/" $lt_i lt_foo;
        } else {
          lt_count--;
        }
      }
    }
  }
  if (lt_foo != "") { lt_freq[lt_foo]++; }
  if (lt_freq[lt_foo] == 1) { print lt_foo; }
}'`
  sys_lib_search_path_spec=`echo $lt_search_path_spec`
else
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi
need_lib_prefix=unknown
hardcode_into_libs=no

# when you set need_version to no, make sure it does not cause -set_version
# flags to be left without arguments
need_version=unknown

case $host_os in
aix3*)
  version_type=linux
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  shlibpath_var=LIBPATH

  # AIX 3 has no versioning support, so we append a major version to the name.
  soname_spec='${libname}${release}${shared_ext}$major'
  ;;

aix[4-9]*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  hardcode_into_libs=yes
  if test "$host_cpu" = ia64; then
    # AIX 5 supports IA64
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
    shlibpath_var=LD_LIBRARY_PATH
  else
    # With GCC up to 2.95.x, collect2 would create an import file
    # for dependence libraries.  The import file would start with
    # the line `#! .'.  This would cause the generated library to
    # depend on `.', always an invalid library.  This was fixed in
    # development snapshots of GCC prior to 3.0.
    case $host_os in
      aix4 | aix4.[01] | aix4.[01].*)
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
	   echo ' yes '
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
	:
      else
	can_build_shared=no
      fi
      ;;
    esac
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
    # soname into executable. Probably we can add versioning support to
    # collect2, so additional links can be useful in future.
    if test "$aix_use_runtimelinking" = yes; then
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
      # instead of lib<name>.a to let people know that these are not
      # typical AIX shared libraries.
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
    else
      # We preserve .a as extension for shared libraries through AIX4.2
      # and later when we are not doing run time linking.
      library_names_spec='${libname}${release}.a $libname.a'
      soname_spec='${libname}${release}${shared_ext}$major'
    fi
    shlibpath_var=LIBPATH
  fi
  ;;

amigaos*)
  library_names_spec='$libname.ixlibrary $libname.a'
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  ;;

beos*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  shlibpath_var=LIBRARY_PATH
  ;;

haiku*)
  # Since haiku provides gcc, use GNU style here
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  hardcode_into_libs=yes
  ;;

bsdi[45]*)
  version_type=linux
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  shlibpath_var=LD_LIBRARY_PATH
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  # the default ld.so.conf also contains /usr/contrib/lib and
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  # libtool to hard-code these into programs
  ;;

cygwin* | mingw* | pw32*)
  version_type=windows
  shrext_cmds=".dll"
  need_version=no
  need_lib_prefix=no

  case $GCC,$host_os in
  yes,cygwin* | yes,mingw* | yes,pw32*)
    library_names_spec='$libname.dll.a'
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
    postinstall_cmds='base_file=`basename \${file}`~
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
      dldir=$destdir/`dirname \$dlpath`~
      test -d \$dldir || mkdir -p \$dldir~
      $install_prog $dir/$dlname \$dldir/$dlname~
      chmod a+x \$dldir/$dlname'
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
      dlpath=$dir/\$dldll~
       $rm \$dlpath'
    shlibpath_overrides_runpath=yes

    case $host_os in
    cygwin*)
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
      ;;
    mingw*)
      # MinGW DLLs use traditional 'lib' prefix
      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
        # It is most probably a Windows format PATH printed by
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
        # path with ; separators, and with drive letters. We can handle the
        # drive letters (cygwin fileutils understands them), so leave them,
        # especially as we might pass files found there to a mingw objdump,
        # which wouldn't understand a cygwinified path. Ahh.
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
      else
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
      fi
      ;;
    pw32*)
      # pw32 DLLs use 'pw' prefix rather than 'lib'
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
      ;;
    esac
    ;;

  *)
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
    ;;
  esac
  dynamic_linker='Win32 ld.exe'
  # FIXME: first we should search . and the directory the executable is in
  shlibpath_var=PATH
  ;;

darwin* | rhapsody*)
  dynamic_linker="$host_os dyld"
  version_type=darwin
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  soname_spec='${libname}${release}${major}$shared_ext'
  shlibpath_overrides_runpath=yes
  shlibpath_var=DYLD_LIBRARY_PATH
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'

  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  ;;

dgux*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  ;;

freebsd* | dragonfly*)
  # DragonFly does not have aout.  When/if they implement a new
  # versioning mechanism, adjust this.
  if test -x /usr/bin/objformat; then
    objformat=`/usr/bin/objformat`
  else
    case $host_os in
    freebsd[123].*) objformat=aout ;;
    *) objformat=elf ;;
    esac
  fi
  version_type=freebsd-$objformat
  case $version_type in
    freebsd-elf*)
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
      need_version=no
      need_lib_prefix=no
      ;;
    freebsd-*)
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
      need_version=yes
      ;;
  esac
  shlibpath_var=LD_LIBRARY_PATH
  case $host_os in
  freebsd2*)
    shlibpath_overrides_runpath=yes
    ;;
  freebsd3.[01]* | freebsdelf3.[01]*)
    shlibpath_overrides_runpath=yes
    hardcode_into_libs=yes
    ;;
  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
    shlibpath_overrides_runpath=no
    hardcode_into_libs=yes
    ;;
  *) # from 4.6 on, and DragonFly
    shlibpath_overrides_runpath=yes
    hardcode_into_libs=yes
    ;;
  esac
  ;;

gnu*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  hardcode_into_libs=yes
  ;;

hpux9* | hpux10* | hpux11*)
  # Give a soname corresponding to the major version so that dld.sl refuses to
  # link against other versions.
  version_type=sunos
  need_lib_prefix=no
  need_version=no
  case $host_cpu in
  ia64*)
    shrext_cmds='.so'
    hardcode_into_libs=yes
    dynamic_linker="$host_os dld.so"
    shlibpath_var=LD_LIBRARY_PATH
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
    soname_spec='${libname}${release}${shared_ext}$major'
    if test "X$HPUX_IA64_MODE" = X32; then
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
    else
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
    fi
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
    ;;
   hppa*64*)
     shrext_cmds='.sl'
     hardcode_into_libs=yes
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
     soname_spec='${libname}${release}${shared_ext}$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   *)
    shrext_cmds='.sl'
    dynamic_linker="$host_os dld.sl"
    shlibpath_var=SHLIB_PATH
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
    soname_spec='${libname}${release}${shared_ext}$major'
    ;;
  esac
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
  postinstall_cmds='chmod 555 $lib'
  ;;

interix[3-9]*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=no
  hardcode_into_libs=yes
  ;;

irix5* | irix6* | nonstopux*)
  case $host_os in
    nonstopux*) version_type=nonstopux ;;
    *)
	if test "$lt_cv_prog_gnu_ld" = yes; then
		version_type=linux
	else
		version_type=irix
	fi ;;
  esac
  need_lib_prefix=no
  need_version=no
  soname_spec='${libname}${release}${shared_ext}$major'
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  case $host_os in
  irix5* | nonstopux*)
    libsuff= shlibsuff=
    ;;
  *)
    case $LD in # libtool.m4 will add one of these switches to LD
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
      libsuff= shlibsuff= libmagic=32-bit;;
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
      libsuff=32 shlibsuff=N32 libmagic=N32;;
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
    *) libsuff= shlibsuff= libmagic=never-match;;
    esac
    ;;
  esac
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  shlibpath_overrides_runpath=no
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  hardcode_into_libs=yes
  ;;

# No shared lib support for Linux oldld, aout, or coff.
linux*oldld* | linux*aout* | linux*coff*)
  dynamic_linker=no
  ;;

# This must be Linux ELF.
linux* | k*bsd*-gnu)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=no
  # This implies no fast_install, which is unacceptable.
  # Some rework will be needed to allow for fast_install
  # before this can be enabled.
  hardcode_into_libs=yes

  # Append ld.so.conf contents to the search path
  if test -f /etc/ld.so.conf; then
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  fi

  # We used to test for /lib/ld.so.1 and disable shared libraries on
  # powerpc, because MkLinux only supported shared libraries with the
  # GNU dynamic linker.  Since this was broken with cross compilers,
  # most powerpc-linux boxes support dynamic linking these days and
  # people can always --disable-shared, the test was removed, and we
  # assume the GNU/Linux dynamic linker is in use.
  dynamic_linker='GNU/Linux ld.so'
  ;;

netbsd*)
  version_type=sunos
  need_lib_prefix=no
  need_version=no
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
    dynamic_linker='NetBSD (a.out) ld.so'
  else
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
    soname_spec='${libname}${release}${shared_ext}$major'
    dynamic_linker='NetBSD ld.elf_so'
  fi
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  hardcode_into_libs=yes
  ;;

newsos6)
  version_type=linux
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  ;;

nto-qnx*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  ;;

openbsd*)
  version_type=sunos
  sys_lib_dlsearch_path_spec="/usr/lib"
  need_lib_prefix=no
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  case $host_os in
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
    *)                         need_version=no  ;;
  esac
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  shlibpath_var=LD_LIBRARY_PATH
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
    case $host_os in
      openbsd2.[89] | openbsd2.[89].*)
	shlibpath_overrides_runpath=no
	;;
      *)
	shlibpath_overrides_runpath=yes
	;;
      esac
  else
    shlibpath_overrides_runpath=yes
  fi
  ;;

os2*)
  libname_spec='$name'
  shrext_cmds=".dll"
  need_lib_prefix=no
  library_names_spec='$libname${shared_ext} $libname.a'
  dynamic_linker='OS/2 ld.exe'
  shlibpath_var=LIBPATH
  ;;

osf3* | osf4* | osf5*)
  version_type=osf
  need_lib_prefix=no
  need_version=no
  soname_spec='${libname}${release}${shared_ext}$major'
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  shlibpath_var=LD_LIBRARY_PATH
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  ;;

rdos*)
  dynamic_linker=no
  ;;

solaris*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  hardcode_into_libs=yes
  # ldd complains unless libraries are executable
  postinstall_cmds='chmod +x $lib'
  ;;

sunos4*)
  version_type=sunos
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  if test "$with_gnu_ld" = yes; then
    need_lib_prefix=no
  fi
  need_version=yes
  ;;

sysv4 | sysv4.3*)
  version_type=linux
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  case $host_vendor in
    sni)
      shlibpath_overrides_runpath=no
      need_lib_prefix=no
      export_dynamic_flag_spec='${wl}-Blargedynsym'
      runpath_var=LD_RUN_PATH
      ;;
    siemens)
      need_lib_prefix=no
      ;;
    motorola)
      need_lib_prefix=no
      need_version=no
      shlibpath_overrides_runpath=no
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
      ;;
  esac
  ;;

sysv4*MP*)
  if test -d /usr/nec ;then
    version_type=linux
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
    soname_spec='$libname${shared_ext}.$major'
    shlibpath_var=LD_LIBRARY_PATH
  fi
  ;;

sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  version_type=freebsd-elf
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  hardcode_into_libs=yes
  if test "$with_gnu_ld" = yes; then
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
    shlibpath_overrides_runpath=no
  else
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
    shlibpath_overrides_runpath=yes
    case $host_os in
      sco3.2v5*)
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
	;;
    esac
  fi
  sys_lib_dlsearch_path_spec='/usr/lib'
  ;;

uts4*)
  version_type=linux
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  ;;

*)
  dynamic_linker=no
  ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
printf "%s\n" "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no

if test ${lt_cv_sys_lib_search_path_spec+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" ;;
esac
fi

sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
if test ${lt_cv_sys_lib_dlsearch_path_spec+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" ;;
esac
fi

sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"

variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
printf %s "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \
   test -n "$runpath_var" || \
   test "X$hardcode_automatic" = "Xyes" ; then

  # We can hardcode non-existent directories.
  if test "$hardcode_direct" != no &&
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
     # have to relink, otherwise we might link with an installed library
     # when we should be linking with a yet-to-be-installed one
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
     test "$hardcode_minus_L" != no; then
    # Linking always hardcodes the temporary library directory.
    hardcode_action=relink
  else
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
    hardcode_action=immediate
  fi
else
  # We cannot hardcode anything, or else we can only hardcode existing
  # directories.
  hardcode_action=unsupported
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
printf "%s\n" "$hardcode_action" >&6; }

if test "$hardcode_action" = relink; then
  # Fast installation is not supported
  enable_fast_install=no
elif test "$shlibpath_overrides_runpath" = yes ||
     test "$enable_shared" = no; then
  # Fast installation is not necessary
  enable_fast_install=needless
fi

striplib=
old_striplib=
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
printf %s "checking whether stripping libraries is possible... " >&6; }
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
# FIXME - insert some real tests, host_os isn't really good enough
  case $host_os in
   darwin*)
       if test -n "$STRIP" ; then
         striplib="$STRIP -x"
         old_striplib="$STRIP -S"
         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
       else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
       ;;
   *)
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
    ;;
  esac
fi

if test "x$enable_dlopen" != xyes; then
  enable_dlopen=unknown
  enable_dlopen_self=unknown
  enable_dlopen_self_static=unknown
else
  lt_cv_dlopen=no
  lt_cv_dlopen_libs=

  case $host_os in
  beos* | haiku*)
    lt_cv_dlopen="load_add_on"
    lt_cv_dlopen_libs=
    lt_cv_dlopen_self=yes
    ;;

  mingw* | pw32*)
    lt_cv_dlopen="LoadLibrary"
    lt_cv_dlopen_libs=
   ;;

  cygwin*)
    lt_cv_dlopen="dlopen"
    lt_cv_dlopen_libs=
   ;;

  darwin*)
  # if libdl is installed we need to link against it
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
printf %s "checking for dlopen in -ldl... " >&6; }
if test ${ac_cv_lib_dl_dlopen+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dlopen (void);
int
main (void)
{
return dlopen ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_dl_dlopen=yes
else case e in #(
  e) ac_cv_lib_dl_dlopen=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes
then :
  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else case e in #(
  e)
    lt_cv_dlopen="dyld"
    lt_cv_dlopen_libs=
    lt_cv_dlopen_self=yes
     ;;
esac
fi

   ;;

  *)
    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
if test "x$ac_cv_func_shl_load" = xyes
then :
  lt_cv_dlopen="shl_load"
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
printf %s "checking for shl_load in -ldld... " >&6; }
if test ${ac_cv_lib_dld_shl_load+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char shl_load (void);
int
main (void)
{
return shl_load ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_dld_shl_load=yes
else case e in #(
  e) ac_cv_lib_dld_shl_load=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes
then :
  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else case e in #(
  e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes
then :
  lt_cv_dlopen="dlopen"
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
printf %s "checking for dlopen in -ldl... " >&6; }
if test ${ac_cv_lib_dl_dlopen+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dlopen (void);
int
main (void)
{
return dlopen ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_dl_dlopen=yes
else case e in #(
  e) ac_cv_lib_dl_dlopen=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes
then :
  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
printf %s "checking for dlopen in -lsvld... " >&6; }
if test ${ac_cv_lib_svld_dlopen+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dlopen (void);
int
main (void)
{
return dlopen ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_svld_dlopen=yes
else case e in #(
  e) ac_cv_lib_svld_dlopen=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
if test "x$ac_cv_lib_svld_dlopen" = xyes
then :
  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else case e in #(
  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
printf %s "checking for dld_link in -ldld... " >&6; }
if test ${ac_cv_lib_dld_dld_link+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.
   The 'extern "C"' is for builds by C++ compilers;
   although this is not generally supported in C code supporting it here
   has little cost and some practical benefit (sr 110532).  */
#ifdef __cplusplus
extern "C"
#endif
char dld_link (void);
int
main (void)
{
return dld_link ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_dld_dld_link=yes
else case e in #(
  e) ac_cv_lib_dld_dld_link=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
if test "x$ac_cv_lib_dld_dld_link" = xyes
then :
  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
fi

	       ;;
esac
fi

	     ;;
esac
fi

	   ;;
esac
fi

	 ;;
esac
fi

       ;;
esac
fi

    ;;
  esac

  if test "x$lt_cv_dlopen" != xno; then
    enable_dlopen=yes
  else
    enable_dlopen=no
  fi

  case $lt_cv_dlopen in
  dlopen)
    save_CPPFLAGS="$CPPFLAGS"
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"

    save_LDFLAGS="$LDFLAGS"
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"

    save_LIBS="$LIBS"
    LIBS="$lt_cv_dlopen_libs $LIBS"

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
printf %s "checking whether a program can dlopen itself... " >&6; }
if test ${lt_cv_dlopen_self+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) 	  if test "$cross_compiling" = yes; then :
  lt_cv_dlopen_self=cross
else
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  lt_status=$lt_dlunknown
  cat > conftest.$ac_ext <<EOF
#line 90132 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif

#include <stdio.h>
#include <stdlib.h>

#ifdef RTLD_GLOBAL
#  define LT_DLGLOBAL		RTLD_GLOBAL
#else
#  ifdef DL_GLOBAL
#    define LT_DLGLOBAL		DL_GLOBAL
#  else
#    define LT_DLGLOBAL		0
#  endif
#endif

/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
   find out it does not work in some platform. */
#ifndef LT_DLLAZY_OR_NOW
#  ifdef RTLD_LAZY
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
#  else
#    ifdef DL_LAZY
#      define LT_DLLAZY_OR_NOW		DL_LAZY
#    else
#      ifdef RTLD_NOW
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
#      else
#        ifdef DL_NOW
#          define LT_DLLAZY_OR_NOW	DL_NOW
#        else
#          define LT_DLLAZY_OR_NOW	0
#        endif
#      endif
#    endif
#  endif
#endif

void fnord(void) { int i=42;}
int main (void)
{
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  int status = $lt_dlunknown;

  if (self)
    {
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
      /* dlclose (self); */
    }
  else
    puts (dlerror ());

    return (status);
}
EOF
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
    (./conftest; exit; ) >&5 2>/dev/null
    lt_status=$?
    case x$lt_status in
      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
    esac
  else :
    # compilation failed
    lt_cv_dlopen_self=no
  fi
fi
rm -fr conftest*

     ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
printf "%s\n" "$lt_cv_dlopen_self" >&6; }

    if test "x$lt_cv_dlopen_self" = xyes; then
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
if test ${lt_cv_dlopen_self_static+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) 	  if test "$cross_compiling" = yes; then :
  lt_cv_dlopen_self_static=cross
else
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  lt_status=$lt_dlunknown
  cat > conftest.$ac_ext <<EOF
#line 90231 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif

#include <stdio.h>
#include <stdlib.h>

#ifdef RTLD_GLOBAL
#  define LT_DLGLOBAL		RTLD_GLOBAL
#else
#  ifdef DL_GLOBAL
#    define LT_DLGLOBAL		DL_GLOBAL
#  else
#    define LT_DLGLOBAL		0
#  endif
#endif

/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
   find out it does not work in some platform. */
#ifndef LT_DLLAZY_OR_NOW
#  ifdef RTLD_LAZY
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
#  else
#    ifdef DL_LAZY
#      define LT_DLLAZY_OR_NOW		DL_LAZY
#    else
#      ifdef RTLD_NOW
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
#      else
#        ifdef DL_NOW
#          define LT_DLLAZY_OR_NOW	DL_NOW
#        else
#          define LT_DLLAZY_OR_NOW	0
#        endif
#      endif
#    endif
#  endif
#endif

void fnord(void) { int i=42;}
int main (void)
{
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  int status = $lt_dlunknown;

  if (self)
    {
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
      /* dlclose (self); */
    }
  else
    puts (dlerror ());

    return (status);
}
EOF
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
    (./conftest; exit; ) >&5 2>/dev/null
    lt_status=$?
    case x$lt_status in
      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
    esac
  else :
    # compilation failed
    lt_cv_dlopen_self_static=no
  fi
fi
rm -fr conftest*

       ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
    fi

    CPPFLAGS="$save_CPPFLAGS"
    LDFLAGS="$save_LDFLAGS"
    LIBS="$save_LIBS"
    ;;
  esac

  case $lt_cv_dlopen_self in
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  *) enable_dlopen_self=unknown ;;
  esac

  case $lt_cv_dlopen_self_static in
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  *) enable_dlopen_self_static=unknown ;;
  esac
fi


# Report which library types will actually be built
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
printf %s "checking if libtool supports shared libraries... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
printf "%s\n" "$can_build_shared" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
printf %s "checking whether to build shared libraries... " >&6; }
test "$can_build_shared" = "no" && enable_shared=no

# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
  test "$enable_shared" = yes && enable_static=no
  if test -n "$RANLIB"; then
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
    postinstall_cmds='$RANLIB $lib'
  fi
  ;;

aix[4-9]*)
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
    test "$enable_shared" = yes && enable_static=no
  fi
    ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
printf "%s\n" "$enable_shared" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
printf %s "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
printf "%s\n" "$enable_static" >&6; }

# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
# with your package, and you will get complaints that there are
# no rules to generate ltmain.sh.
if test -f "$ltmain"; then
  # See if we are running on zsh, and set the options which allow our commands through
  # without removal of \ escapes.
  if test -n "${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
  fi
  # Now quote all the things that may contain metacharacters while being
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
  # variables and quote the copies for generation of the libtool script.
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
    SED SHELL STRIP \
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
    deplibs_check_method reload_flag reload_cmds need_locks \
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
    lt_cv_sys_global_symbol_to_c_name_address \
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
    old_postinstall_cmds old_postuninstall_cmds \
    compiler \
    CC \
    LD \
    lt_prog_compiler_wl \
    lt_prog_compiler_pic \
    lt_prog_compiler_static \
    lt_prog_compiler_no_builtin_flag \
    export_dynamic_flag_spec \
    thread_safe_flag_spec \
    whole_archive_flag_spec \
    enable_shared_with_static_runtimes \
    old_archive_cmds \
    old_archive_from_new_cmds \
    predep_objects \
    postdep_objects \
    predeps \
    postdeps \
    compiler_lib_search_path \
    compiler_lib_search_dirs \
    archive_cmds \
    archive_expsym_cmds \
    postinstall_cmds \
    postuninstall_cmds \
    old_archive_from_expsyms_cmds \
    allow_undefined_flag \
    no_undefined_flag \
    export_symbols_cmds \
    hardcode_libdir_flag_spec \
    hardcode_libdir_flag_spec_ld \
    hardcode_libdir_separator \
    hardcode_automatic \
    module_cmds \
    module_expsym_cmds \
    lt_cv_prog_compiler_c_o \
    fix_srcfile_path \
    exclude_expsyms \
    include_expsyms; do

    case $var in
    old_archive_cmds | \
    old_archive_from_new_cmds | \
    archive_cmds | \
    archive_expsym_cmds | \
    module_cmds | \
    module_expsym_cmds | \
    old_archive_from_expsyms_cmds | \
    export_symbols_cmds | \
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
    postinstall_cmds | postuninstall_cmds | \
    old_postinstall_cmds | old_postuninstall_cmds | \
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
      # Double-quote double-evaled strings.
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
      ;;
    *)
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
      ;;
    esac
  done

  case $lt_echo in
  *'\$0 --fallback-echo"')
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
    ;;
  esac

cfgfile="${ofile}T"
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  $rm -f "$cfgfile"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
creating $ofile" >&5
printf "%s\n" "
creating $ofile" >&6; }

  cat <<__EOF__ >> "$cfgfile"
#! $SHELL

# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# A sed program that does not truncate output.
SED=$lt_SED

# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="$SED -e 1s/^X//"

# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

# The names of the tagged configurations supported by this script.
available_tags=

# ### BEGIN LIBTOOL CONFIG

# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:

# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL

# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared

# Whether or not to build static libraries.
build_old_libs=$enable_static

# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=$archive_cmds_need_lc

# Whether or not to disallow shared libs when runtime libs are static
allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes

# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install

# The host system.
host_alias=$host_alias
host=$host
host_os=$host_os

# The build system.
build_alias=$build_alias
build=$build
build_os=$build_os

# An echo program that does not interpret backslashes.
echo=$lt_echo

# The archiver.
AR=$lt_AR
AR_FLAGS=$lt_AR_FLAGS

# A C compiler.
LTCC=$lt_LTCC

# LTCC compiler flags.
LTCFLAGS=$lt_LTCFLAGS

# A language-specific compiler.
CC=$lt_compiler

# Is the compiler the GNU C compiler?
with_gcc=$GCC

# An ERE matcher.
EGREP=$lt_EGREP

# The linker used to build libraries.
LD=$lt_LD

# Whether we need hard or soft links.
LN_S=$lt_LN_S

# A BSD-compatible nm program.
NM=$lt_NM

# A symbol stripping program
STRIP=$lt_STRIP

# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD

# Used on cygwin: DLL creation program.
DLLTOOL="$DLLTOOL"

# Used on cygwin: object dumper.
OBJDUMP="$OBJDUMP"

# Used on cygwin: assembler.
AS="$AS"

# The name of the directory that contains temporary libtool files.
objdir=$objdir

# How to create reloadable object files.
reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds

# How to pass a linker flag through the compiler.
wl=$lt_lt_prog_compiler_wl

# Object file suffix (normally "o").
objext="$ac_objext"

# Old archive suffix (normally "a").
libext="$libext"

# Shared library suffix (normally ".so").
shrext_cmds='$shrext_cmds'

# Executable file suffix (normally "").
exeext="$exeext"

# Additional compiler flags for building library objects.
pic_flag=$lt_lt_prog_compiler_pic
pic_mode=$pic_mode

# What is the maximum length of a command?
max_cmd_len=$lt_cv_sys_max_cmd_len

# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o

# Must we lock files when doing compilation?
need_locks=$lt_need_locks

# Do we need the lib prefix for modules?
need_lib_prefix=$need_lib_prefix

# Do we need a version for libraries?
need_version=$need_version

# Whether dlopen is supported.
dlopen_support=$enable_dlopen

# Whether dlopen of programs is supported.
dlopen_self=$enable_dlopen_self

# Whether dlopen of statically linked programs is supported.
dlopen_self_static=$enable_dlopen_self_static

# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static

# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag

# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec

# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec=$lt_whole_archive_flag_spec

# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=$lt_thread_safe_flag_spec

# Library versioning type.
version_type=$version_type

# Format of library name prefix.
libname_spec=$lt_libname_spec

# List of archive names.  First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec=$lt_library_names_spec

# The coded name of the library, if different from the real name.
soname_spec=$lt_soname_spec

# Commands used to build and install an old-style archive.
RANLIB=$lt_RANLIB
old_archive_cmds=$lt_old_archive_cmds
old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds

# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds

# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds

# Commands used to build and install a shared archive.
archive_cmds=$lt_archive_cmds
archive_expsym_cmds=$lt_archive_expsym_cmds
postinstall_cmds=$lt_postinstall_cmds
postuninstall_cmds=$lt_postuninstall_cmds

# Commands used to build a loadable module (assumed same as above if empty)
module_cmds=$lt_module_cmds
module_expsym_cmds=$lt_module_expsym_cmds

# Commands to strip libraries.
old_striplib=$lt_old_striplib
striplib=$lt_striplib

# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects=$lt_predep_objects

# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects=$lt_postdep_objects

# Dependencies to place before the objects being linked to create a
# shared library.
predeps=$lt_predeps

# Dependencies to place after the objects being linked to create a
# shared library.
postdeps=$lt_postdeps

# The directories searched by this compiler when creating a shared
# library
compiler_lib_search_dirs=$lt_compiler_lib_search_dirs

# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path

# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method

# Command to use when deplibs_check_method == file_magic.
file_magic_cmd=$lt_file_magic_cmd

# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=$lt_allow_undefined_flag

# Flag that forces no undefined symbols.
no_undefined_flag=$lt_no_undefined_flag

# Commands used to finish a libtool library installation in a directory.
finish_cmds=$lt_finish_cmds

# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=$lt_finish_eval

# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe

# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl

# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address

# This is the shared library runtime path variable.
runpath_var=$runpath_var

# This is the shared library path variable.
shlibpath_var=$shlibpath_var

# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=$shlibpath_overrides_runpath

# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action

# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs

# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec

# If ld is used when linking, flag to hardcode \$libdir into
# a binary during linking. This must work even if \$libdir does
# not exist.
hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld

# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator

# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
# resulting binary.
hardcode_direct=$hardcode_direct

# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L=$hardcode_minus_L

# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var

# Set to yes if building a shared library automatically hardcodes DIR into the library
# and all subsequent libraries and executables linked against it.
hardcode_automatic=$hardcode_automatic

# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="$variables_saved_for_relink"

# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs

# Compile-time system search path for libraries
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec

# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec

# Fix the shell variable \$srcfile for the compiler.
fix_srcfile_path=$lt_fix_srcfile_path

# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols

# The commands to list exported symbols.
export_symbols_cmds=$lt_export_symbols_cmds

# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$lt_extract_expsyms_cmds

# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms=$lt_exclude_expsyms

# Symbols that must always be exported.
include_expsyms=$lt_include_expsyms

# ### END LIBTOOL CONFIG

__EOF__


  case $host_os in
  aix3*)
    cat <<\EOF >> "$cfgfile"

# AIX sometimes has problems with the GCC collect2 program.  For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
if test "X${COLLECT_NAMES+set}" != Xset; then
  COLLECT_NAMES=
  export COLLECT_NAMES
fi
EOF
    ;;
  esac

  # We use sed instead of cat because bash on DJGPP gets confused if
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
  # text mode, it properly converts lines to CR/LF.  This bash problem
  # is reportedly fixed, but why not run on old versions too?
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)

  mv -f "$cfgfile" "$ofile" || \
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  chmod +x "$ofile"

else
  # If there is no Makefile yet, we rely on a make rule to execute
  # `config.status --recheck' to rerun these tests and create the
  # libtool script then.
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  if test -f "$ltmain_in"; then
    test -f Makefile && make "$ltmain"
  fi
fi


ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CC="$lt_save_CC"


# Check whether --with-tags was given.
if test ${with_tags+y}
then :
  withval=$with_tags; tagnames="$withval"
fi


if test -f "$ltmain" && test -n "$tagnames"; then
  if test ! -f "${ofile}"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: output file '$ofile' does not exist" >&5
printf "%s\n" "$as_me: WARNING: output file '$ofile' does not exist" >&2;}
  fi

  if test -z "$LTCC"; then
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
    if test -z "$LTCC"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: output file '$ofile' does not look like a libtool script" >&5
printf "%s\n" "$as_me: WARNING: output file '$ofile' does not look like a libtool script" >&2;}
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using 'LTCC=$LTCC', extracted from '$ofile'" >&5
printf "%s\n" "$as_me: WARNING: using 'LTCC=$LTCC', extracted from '$ofile'" >&2;}
    fi
  fi
  if test -z "$LTCFLAGS"; then
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
  fi

  # Extract list of available tagged configurations in $ofile.
  # Note that this assumes the entire list is on one line.
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`

  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  for tagname in $tagnames; do
    IFS="$lt_save_ifs"
    # Check whether tagname contains only valid characters
    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
    "") ;;
    *)  as_fn_error $? "invalid tag name: $tagname" "$LINENO" 5
	;;
    esac

    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
    then
      as_fn_error $? "tag name \"$tagname\" already exists" "$LINENO" 5
    fi

    # Update the list of available tags.
    if test -n "$tagname"; then
      echo appending configuration tag \"$tagname\" to $ofile

      case $tagname in
      CXX)
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
	    (test "X$CXX" != "Xg++"))) ; then
	  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu




archive_cmds_need_lc_CXX=no
allow_undefined_flag_CXX=
always_export_symbols_CXX=no
archive_expsym_cmds_CXX=
export_dynamic_flag_spec_CXX=
hardcode_direct_CXX=no
hardcode_libdir_flag_spec_CXX=
hardcode_libdir_flag_spec_ld_CXX=
hardcode_libdir_separator_CXX=
hardcode_minus_L_CXX=no
hardcode_shlibpath_var_CXX=unsupported
hardcode_automatic_CXX=no
module_cmds_CXX=
module_expsym_cmds_CXX=
link_all_deplibs_CXX=unknown
old_archive_cmds_CXX=$old_archive_cmds
no_undefined_flag_CXX=
whole_archive_flag_spec_CXX=
enable_shared_with_static_runtimes_CXX=no

# Dependencies to place before and after the object being linked:
predep_objects_CXX=
postdep_objects_CXX=
predeps_CXX=
postdeps_CXX=
compiler_lib_search_path_CXX=
compiler_lib_search_dirs_CXX=

# Source file extension for C++ test sources.
ac_ext=cpp

# Object file extension for compiled C++ test sources.
objext=o
objext_CXX=$objext

# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"

# Code to be used in simple link tests
lt_simple_link_test_code='int main(int, char *[]) { return(0); }'

# ltmain only uses $CC for tagged configurations so make sure $CC is set.

# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}

# If no C compiler flags were specified, use CFLAGS.
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}

# Allow CC to be a program name with arguments.
compiler=$CC


# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*

ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm -r conftest*


# Allow CC to be a program name with arguments.
lt_save_CC=$CC
lt_save_LD=$LD
lt_save_GCC=$GCC
GCC=$GXX
lt_save_with_gnu_ld=$with_gnu_ld
lt_save_path_LD=$lt_cv_path_LD
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
else
  unset lt_cv_prog_gnu_ld
fi
if test -n "${lt_cv_path_LDCXX+set}"; then
  lt_cv_path_LD=$lt_cv_path_LDCXX
else
  unset lt_cv_path_LD
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
compiler=$CC
compiler_CXX=$CC
for cc_temp in $compiler""; do
  case $cc_temp in
    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
    \-*) ;;
    *) break;;
  esac
done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`


# We don't want -fno-exception wen compiling C++ code, so set the
# no_builtin_flag separately
if test "$GXX" = yes; then
  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
else
  lt_prog_compiler_no_builtin_flag_CXX=
fi

if test "$GXX" = yes; then
  # Set up default GNU C++ configuration


# Check whether --with-gnu-ld was given.
if test ${with_gnu_ld+y}
then :
  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else case e in #(
  e) with_gnu_ld=no ;;
esac
fi

ac_prog=ld
if test "$GCC" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
printf %s "checking for ld used by $CC... " >&6; }
  case $host in
  *-*-mingw*)
    # gcc leaves a trailing carriage return which upsets mingw
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  *)
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  esac
  case $ac_prog in
    # Accept absolute paths.
    [\\/]* | ?:[\\/]*)
      re_direlt='/[^/][^/]*/\.\./'
      # Canonicalize the pathname of ld
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
      done
      test -z "$LD" && LD="$ac_prog"
      ;;
  "")
    # If it fails, then pretend we aren't using GCC.
    ac_prog=ld
    ;;
  *)
    # If it is relative, then search for the first ld in PATH.
    with_gnu_ld=unknown
    ;;
  esac
elif test "$with_gnu_ld" = yes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
printf %s "checking for GNU ld... " >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
printf %s "checking for non-GNU ld... " >&6; }
fi
if test ${lt_cv_path_LD+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) if test -z "$LD"; then
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  for ac_dir in $PATH; do
    IFS="$lt_save_ifs"
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
      lt_cv_path_LD="$ac_dir/$ac_prog"
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # but apparently some variants of GNU ld only accept -v.
      # Break only if it was the GNU/non-GNU ld that we prefer.
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
      *GNU* | *'with BFD'*)
	test "$with_gnu_ld" != no && break
	;;
      *)
	test "$with_gnu_ld" != yes && break
	;;
      esac
    fi
  done
  IFS="$lt_save_ifs"
else
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi ;;
esac
fi

LD="$lt_cv_path_LD"
if test -n "$LD"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
printf "%s\n" "$LD" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
if test ${lt_cv_prog_gnu_ld+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
  lt_cv_prog_gnu_ld=yes
  ;;
*)
  lt_cv_prog_gnu_ld=no
  ;;
esac ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld



  # Check if GNU C++ uses GNU ld as the underlying linker, since the
  # archiving commands below assume that GNU ld is being used.
  if test "$with_gnu_ld" = yes; then
    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'

    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'

    # If archive_cmds runs LD, not CC, wlarc should be empty
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
    #     investigate it a little bit more. (MM)
    wlarc='${wl}'

    # ancient GNU ld didn't support --whole-archive et. al.
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
	grep 'no-whole-archive' > /dev/null; then
      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    else
      whole_archive_flag_spec_CXX=
    fi
  else
    with_gnu_ld=no
    wlarc=

    # A generic and very simple default shared library creation
    # command for GNU C++ for the case where it uses the native
    # linker, instead of GNU ld.  If possible, this setting should
    # overridden to take advantage of the native linker features on
    # the platform it is being used on.
    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  fi

  # Commands to make compiler produce verbose output that lists
  # what "hidden" libraries, object files and flags are used when
  # linking a shared library.
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'

else
  GXX=no
  with_gnu_ld=no
  wlarc=
fi

# PORTME: fill in a description of your system's C++ link characteristics
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
ld_shlibs_CXX=yes
case $host_os in
  aix3*)
    # FIXME: insert proper C++ library support
    ld_shlibs_CXX=no
    ;;
  aix[4-9]*)
    if test "$host_cpu" = ia64; then
      # On IA64, the linker does run time linking by default, so we don't
      # have to do anything special.
      aix_use_runtimelinking=no
      exp_sym_flag='-Bexport'
      no_entry_flag=""
    else
      aix_use_runtimelinking=no

      # Test if we are trying to use run time linking or normal
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
      # need to do runtime linking.
      case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
	for ld_flag in $LDFLAGS; do
	  case $ld_flag in
	  *-brtl*)
	    aix_use_runtimelinking=yes
	    break
	    ;;
	  esac
	done
	;;
      esac

      exp_sym_flag='-bexport'
      no_entry_flag='-bnoentry'
    fi

    # When large executables or shared objects are built, AIX ld can
    # have problems creating the table of contents.  If linking a library
    # or program results in "error TOC overflow" add -mminimal-toc to
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.

    archive_cmds_CXX=''
    hardcode_direct_CXX=yes
    hardcode_libdir_separator_CXX=':'
    link_all_deplibs_CXX=yes

    if test "$GXX" = yes; then
      case $host_os in aix4.[012]|aix4.[012].*)
      # We only want to do this on AIX 4.2 and lower, the check
      # below for broken collect2 doesn't work under 4.3+
	collect2name=`${CC} -print-prog-name=collect2`
	if test -f "$collect2name" && \
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
	then
	  # We have reworked collect2
	  :
	else
	  # We have old collect2
	  hardcode_direct_CXX=unsupported
	  # It fails to find uninstalled libraries when the uninstalled
	  # path is not listed in the libpath.  Setting hardcode_minus_L
	  # to unsupported forces relinking
	  hardcode_minus_L_CXX=yes
	  hardcode_libdir_flag_spec_CXX='-L$libdir'
	  hardcode_libdir_separator_CXX=
	fi
	;;
      esac
      shared_flag='-shared'
      if test "$aix_use_runtimelinking" = yes; then
	shared_flag="$shared_flag "'${wl}-G'
      fi
    else
      # not using gcc
      if test "$host_cpu" = ia64; then
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
	# chokes on -Wl,-G. The following line is correct:
	shared_flag='-G'
      else
	if test "$aix_use_runtimelinking" = yes; then
	  shared_flag='${wl}-G'
	else
	  shared_flag='${wl}-bM:SRE'
	fi
      fi
    fi

    # It seems that -bexpall does not export symbols beginning with
    # underscore (_), so it is better to generate a list of symbols to export.
    always_export_symbols_CXX=yes
    if test "$aix_use_runtimelinking" = yes; then
      # Warning - without using the other runtime loading flags (-brtl),
      # -berok will link without error, but may produce a broken library.
      allow_undefined_flag_CXX='-berok'
      # Determine the default libpath from the value encoded in an empty executable.

cat > conftest.$ac_ext <<EOF
#line 91300 "configure"
#include "confdefs.h"
int main(void) {
; return 0; }
EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext}; then

lt_aix_libpath_sed='
    /Import File Strings/,/^$/ {
	/^0/ {
	    s/^0  *\(.*\)$/\1/
	    p
	}
    }'
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
if test -z "$aix_libpath"; then
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
  rm -rf conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&6
fi
rm -f conftest*
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi

      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"

      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
     else
      if test "$host_cpu" = ia64; then
	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
	allow_undefined_flag_CXX="-z nodefs"
	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
      else
	# Determine the default libpath from the value encoded in an empty executable.

cat > conftest.$ac_ext <<EOF
#line 91343 "configure"
#include "confdefs.h"
int main(void) {
; return 0; }
EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext}; then

lt_aix_libpath_sed='
    /Import File Strings/,/^$/ {
	/^0/ {
	    s/^0  *\(.*\)$/\1/
	    p
	}
    }'
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
if test -z "$aix_libpath"; then
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
  rm -rf conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&6
fi
rm -f conftest*
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi

	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
	# Warning - without using the other run time loading flags,
	# -berok will link without error, but may produce a broken library.
	no_undefined_flag_CXX=' ${wl}-bernotok'
	allow_undefined_flag_CXX=' ${wl}-berok'
	# Exported symbols can be pulled into shared objects from archives
	whole_archive_flag_spec_CXX='$convenience'
	archive_cmds_need_lc_CXX=yes
	# This is similar to how AIX traditionally builds its shared libraries.
	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
      fi
    fi
    ;;

  beos*)
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
      allow_undefined_flag_CXX=unsupported
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
      # support --undefined.  This deserves some investigation.  FIXME
      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    else
      ld_shlibs_CXX=no
    fi
    ;;

  chorus*)
    case $cc_basename in
      *)
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
    esac
    ;;

  cygwin* | mingw* | pw32*)
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
    # as there is no search path for DLLs.
    hardcode_libdir_flag_spec_CXX='-L$libdir'
    allow_undefined_flag_CXX=unsupported
    always_export_symbols_CXX=no
    enable_shared_with_static_runtimes_CXX=yes

    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
      # If the export-symbols file already is a .def file (1st line
      # is EXPORTS), use it as is; otherwise, prepend...
      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
	cp $export_symbols $output_objdir/$soname.def;
      else
	echo EXPORTS > $output_objdir/$soname.def;
	cat $export_symbols >> $output_objdir/$soname.def;
      fi~
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
    else
      ld_shlibs_CXX=no
    fi
  ;;
      darwin* | rhapsody*)
      archive_cmds_need_lc_CXX=no
      hardcode_direct_CXX=no
      hardcode_automatic_CXX=yes
      hardcode_shlibpath_var_CXX=unsupported
      whole_archive_flag_spec_CXX=''
      link_all_deplibs_CXX=yes
      allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
      if test "$GXX" = yes ; then
      output_verbose_link_cmd='echo'
      archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
      module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
      module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
        archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
        archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
      fi
      else
      case $cc_basename in
        xlc*)
         output_verbose_link_cmd='echo'
          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
          ;;
       *)
         ld_shlibs_CXX=no
          ;;
      esac
      fi
        ;;

  dgux*)
    case $cc_basename in
      ec++*)
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      ghcx*)
	# Green Hills C++ Compiler
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      *)
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
    esac
    ;;
  freebsd[12].*)
    # C++ shared libraries reported to be fairly broken before switch to ELF
    ld_shlibs_CXX=no
    ;;
  freebsd-elf*)
    archive_cmds_need_lc_CXX=no
    ;;
  freebsd* | dragonfly*)
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
    # conventions
    ld_shlibs_CXX=yes
    ;;
  gnu*)
    ;;
  hpux9*)
    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
    hardcode_libdir_separator_CXX=:
    export_dynamic_flag_spec_CXX='${wl}-E'
    hardcode_direct_CXX=yes
    hardcode_minus_L_CXX=yes # Not in the search PATH,
				# but as the default
				# location of the library.

    case $cc_basename in
    CC*)
      # FIXME: insert proper C++ library support
      ld_shlibs_CXX=no
      ;;
    aCC*)
      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
      # Commands to make compiler produce verbose output that lists
      # what "hidden" libraries, object files and flags are used when
      # linking a shared library.
      #
      # There doesn't appear to be a way to prevent this compiler from
      # explicitly linking system object files so we need to strip them
      # from the output so that they don't get included in the library
      # dependencies.
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
      ;;
    *)
      if test "$GXX" = yes; then
        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
      else
        # FIXME: insert proper C++ library support
        ld_shlibs_CXX=no
      fi
      ;;
    esac
    ;;
  hpux10*|hpux11*)
    if test $with_gnu_ld = no; then
      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
      hardcode_libdir_separator_CXX=:

      case $host_cpu in
      hppa*64*|ia64*) ;;
      *)
	export_dynamic_flag_spec_CXX='${wl}-E'
        ;;
      esac
    fi
    case $host_cpu in
    hppa*64*|ia64*)
      hardcode_direct_CXX=no
      hardcode_shlibpath_var_CXX=no
      ;;
    *)
      hardcode_direct_CXX=yes
      hardcode_minus_L_CXX=yes # Not in the search PATH,
					      # but as the default
					      # location of the library.
      ;;
    esac

    case $cc_basename in
      CC*)
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      aCC*)
	case $host_cpu in
	hppa*64*)
	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
	  ;;
	ia64*)
	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
	  ;;
	*)
	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
	  ;;
	esac
	# Commands to make compiler produce verbose output that lists
	# what "hidden" libraries, object files and flags are used when
	# linking a shared library.
	#
	# There doesn't appear to be a way to prevent this compiler from
	# explicitly linking system object files so we need to strip them
	# from the output so that they don't get included in the library
	# dependencies.
	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
	;;
      *)
	if test "$GXX" = yes; then
	  if test $with_gnu_ld = no; then
	    case $host_cpu in
	    hppa*64*)
	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
	      ;;
	    ia64*)
	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
	      ;;
	    *)
	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
	      ;;
	    esac
	  fi
	else
	  # FIXME: insert proper C++ library support
	  ld_shlibs_CXX=no
	fi
	;;
    esac
    ;;
  interix[3-9]*)
    hardcode_direct_CXX=no
    hardcode_shlibpath_var_CXX=no
    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
    export_dynamic_flag_spec_CXX='${wl}-E'
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
    # Instead, shared libraries are loaded at an image base (0x10000000 by
    # default) and relocated if they conflict, which is a slow very memory
    # consuming and fragmenting process.  To avoid this, we pick a random,
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
    ;;
  irix5* | irix6*)
    case $cc_basename in
      CC*)
	# SGI C++
	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'

	# Archives containing C++ object files must be created using
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
	# necessary to make sure instantiated templates are included
	# in the archive.
	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
	;;
      *)
	if test "$GXX" = yes; then
	  if test "$with_gnu_ld" = no; then
	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
	  else
	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
	  fi
	fi
	link_all_deplibs_CXX=yes
	;;
    esac
    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
    hardcode_libdir_separator_CXX=:
    ;;
  linux* | k*bsd*-gnu)
    case $cc_basename in
      KCC*)
	# Kuck and Associates, Inc. (KAI) C++ Compiler

	# KCC will only create a shared library if the output file
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
	# to its proper name (with version) after linking.
	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
	archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
	# Commands to make compiler produce verbose output that lists
	# what "hidden" libraries, object files and flags are used when
	# linking a shared library.
	#
	# There doesn't appear to be a way to prevent this compiler from
	# explicitly linking system object files so we need to strip them
	# from the output so that they don't get included in the library
	# dependencies.
	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'

	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'

	# Archives containing C++ object files must be created using
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
	;;
      icpc*)
	# Intel C++
	with_gnu_ld=yes
	# version 8.0 and above of icpc choke on multiply defined symbols
	# if we add $predep_objects and $postdep_objects, however 7.1 and
	# earlier do not add the objects themselves.
	case `$CC -V 2>&1` in
	*"Version 7."*)
  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  	  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
	  ;;
	*)  # Version 8.0 or newer
	  tmp_idyn=
	  case $host_cpu in
	    ia64*) tmp_idyn=' -i_dynamic';;
	  esac
  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
	  ;;
	esac
	archive_cmds_need_lc_CXX=no
	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
	;;
      pgCC* | pgcpp*)
        # Portland Group C++ compiler
	archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'

	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
	whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
        ;;
      cxx*)
	# Compaq C++
	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'

	runpath_var=LD_RUN_PATH
	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
	hardcode_libdir_separator_CXX=:

	# Commands to make compiler produce verbose output that lists
	# what "hidden" libraries, object files and flags are used when
	# linking a shared library.
	#
	# There doesn't appear to be a way to prevent this compiler from
	# explicitly linking system object files so we need to strip them
	# from the output so that they don't get included in the library
	# dependencies.
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
	;;
      *)
	case `$CC -V 2>&1 | sed 5q` in
	*Sun\ C*)
	  # Sun C++ 5.9
	  no_undefined_flag_CXX=' -zdefs'
	  archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
	  archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
	  hardcode_libdir_flag_spec_CXX='-R$libdir'
	  whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'

	  # Not sure whether something based on
	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
	  # would be better.
	  output_verbose_link_cmd='echo'

	  # Archives containing C++ object files must be created using
	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
	  # necessary to make sure instantiated templates are included
	  # in the archive.
	  old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
	  ;;
	esac
	;;
    esac
    ;;
  lynxos*)
    # FIXME: insert proper C++ library support
    ld_shlibs_CXX=no
    ;;
  m88k*)
    # FIXME: insert proper C++ library support
    ld_shlibs_CXX=no
    ;;
  mvs*)
    case $cc_basename in
      cxx*)
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      *)
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
    esac
    ;;
  netbsd*)
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
      wlarc=
      hardcode_libdir_flag_spec_CXX='-R$libdir'
      hardcode_direct_CXX=yes
      hardcode_shlibpath_var_CXX=no
    fi
    # Workaround some broken pre-1.5 toolchains
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
    ;;
  openbsd2*)
    # C++ shared libraries are fairly broken
    ld_shlibs_CXX=no
    ;;
  openbsd*)
    if test -f /usr/libexec/ld.so; then
      hardcode_direct_CXX=yes
      hardcode_shlibpath_var_CXX=no
      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
      hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
	export_dynamic_flag_spec_CXX='${wl}-E'
	whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
      fi
      output_verbose_link_cmd='echo'
    else
      ld_shlibs_CXX=no
    fi
    ;;
  osf3*)
    case $cc_basename in
      KCC*)
	# Kuck and Associates, Inc. (KAI) C++ Compiler

	# KCC will only create a shared library if the output file
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
	# to its proper name (with version) after linking.
	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'

	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
	hardcode_libdir_separator_CXX=:

	# Archives containing C++ object files must be created using
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'

	;;
      RCC*)
	# Rational C++ 2.4.1
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      cxx*)
	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'

	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
	hardcode_libdir_separator_CXX=:

	# Commands to make compiler produce verbose output that lists
	# what "hidden" libraries, object files and flags are used when
	# linking a shared library.
	#
	# There doesn't appear to be a way to prevent this compiler from
	# explicitly linking system object files so we need to strip them
	# from the output so that they don't get included in the library
	# dependencies.
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
	;;
      *)
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
	  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'

	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
	  hardcode_libdir_separator_CXX=:

	  # Commands to make compiler produce verbose output that lists
	  # what "hidden" libraries, object files and flags are used when
	  # linking a shared library.
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'

	else
	  # FIXME: insert proper C++ library support
	  ld_shlibs_CXX=no
	fi
	;;
    esac
    ;;
  osf4* | osf5*)
    case $cc_basename in
      KCC*)
	# Kuck and Associates, Inc. (KAI) C++ Compiler

	# KCC will only create a shared library if the output file
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
	# to its proper name (with version) after linking.
	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'

	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
	hardcode_libdir_separator_CXX=:

	# Archives containing C++ object files must be created using
	# the KAI C++ compiler.
	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
	;;
      RCC*)
	# Rational C++ 2.4.1
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      cxx*)
	allow_undefined_flag_CXX=' -expect_unresolved \*'
	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
	  echo "-hidden">> $lib.exp~
	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
	  $rm $lib.exp'

	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
	hardcode_libdir_separator_CXX=:

	# Commands to make compiler produce verbose output that lists
	# what "hidden" libraries, object files and flags are used when
	# linking a shared library.
	#
	# There doesn't appear to be a way to prevent this compiler from
	# explicitly linking system object files so we need to strip them
	# from the output so that they don't get included in the library
	# dependencies.
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
	;;
      *)
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
	 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'

	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
	  hardcode_libdir_separator_CXX=:

	  # Commands to make compiler produce verbose output that lists
	  # what "hidden" libraries, object files and flags are used when
	  # linking a shared library.
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'

	else
	  # FIXME: insert proper C++ library support
	  ld_shlibs_CXX=no
	fi
	;;
    esac
    ;;
  psos*)
    # FIXME: insert proper C++ library support
    ld_shlibs_CXX=no
    ;;
  sunos4*)
    case $cc_basename in
      CC*)
	# Sun C++ 4.x
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      lcc*)
	# Lucid
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      *)
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
    esac
    ;;
  solaris*)
    case $cc_basename in
      CC*)
	# Sun C++ 4.2, 5.x and Centerline C++
        archive_cmds_need_lc_CXX=yes
	no_undefined_flag_CXX=' -zdefs'
	archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'

	hardcode_libdir_flag_spec_CXX='-R$libdir'
	hardcode_shlibpath_var_CXX=no
	case $host_os in
	  solaris2.[0-5] | solaris2.[0-5].*) ;;
	  *)
	    # The compiler driver will combine and reorder linker options,
	    # but understands `-z linker_flag'.
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
	    whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
	    ;;
	esac
	link_all_deplibs_CXX=yes

	output_verbose_link_cmd='echo'

	# Archives containing C++ object files must be created using
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
	# necessary to make sure instantiated templates are included
	# in the archive.
	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
	;;
      gcx*)
	# Green Hills C++ Compiler
	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'

	# The C++ compiler must be used to create the archive.
	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
	;;
      *)
	# GNU C++ compiler with Solaris linker
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'

	    # Commands to make compiler produce verbose output that lists
	    # what "hidden" libraries, object files and flags are used when
	    # linking a shared library.
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
	  else
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
	    # platform.
	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'

	    # Commands to make compiler produce verbose output that lists
	    # what "hidden" libraries, object files and flags are used when
	    # linking a shared library.
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
	  fi

	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
	  case $host_os in
	  solaris2.[0-5] | solaris2.[0-5].*) ;;
	  *)
	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
	    ;;
	  esac
	fi
	;;
    esac
    ;;
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
    no_undefined_flag_CXX='${wl}-z,text'
    archive_cmds_need_lc_CXX=no
    hardcode_shlibpath_var_CXX=no
    runpath_var='LD_RUN_PATH'

    case $cc_basename in
      CC*)
	archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
	;;
      *)
	archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
	;;
    esac
    ;;
  sysv5* | sco3.2v5* | sco5v6*)
    # Note: We can NOT use -z defs as we might desire, because we do not
    # link with -lc, and that would cause any symbols used from libc to
    # always be unresolved, which means just about no library would
    # ever link correctly.  If we're not using GNU ld we use -z text
    # though, which does catch some bad symbols but isn't as heavy-handed
    # as -z defs.
    # For security reasons, it is highly recommended that you always
    # use absolute paths for naming shared libraries, and exclude the
    # DT_RUNPATH tag from executables and libraries.  But doing so
    # requires that you compile everything twice, which is a pain.
    # So that behaviour is only enabled if SCOABSPATH is set to a
    # non-empty value in the environment.  Most likely only useful for
    # creating official distributions of packages.
    # This is a hack until libtool officially supports absolute path
    # names for shared libraries.
    no_undefined_flag_CXX='${wl}-z,text'
    allow_undefined_flag_CXX='${wl}-z,nodefs'
    archive_cmds_need_lc_CXX=no
    hardcode_shlibpath_var_CXX=no
    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    hardcode_libdir_separator_CXX=':'
    link_all_deplibs_CXX=yes
    export_dynamic_flag_spec_CXX='${wl}-Bexport'
    runpath_var='LD_RUN_PATH'

    case $cc_basename in
      CC*)
	archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
	;;
      *)
	archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
	;;
    esac
    ;;
  tandem*)
    case $cc_basename in
      NCC*)
	# NonStop-UX NCC 3.20
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
      *)
	# FIXME: insert proper C++ library support
	ld_shlibs_CXX=no
	;;
    esac
    ;;
  vxworks*)
    # FIXME: insert proper C++ library support
    ld_shlibs_CXX=no
    ;;
  *)
    # FIXME: insert proper C++ library support
    ld_shlibs_CXX=no
    ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
printf "%s\n" "$ld_shlibs_CXX" >&6; }
test "$ld_shlibs_CXX" = no && can_build_shared=no

GCC_CXX="$GXX"
LD_CXX="$LD"

## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
## the running order or otherwise move them around unless you know exactly
## what you are doing...
cat > conftest.$ac_ext <<EOF
class Foo
{
public:
  Foo (void) { a = 0; }
private:
  int a;
};
EOF

if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  # Parse the compiler output and extract the necessary
  # objects, libraries and library flags.

  # Sentinel used to keep track of whether or not we are before
  # the conftest object file.
  pre_test_object_deps_done=no

  # The `*' in the case matches for architectures that use `case' in
  # $output_verbose_cmd can trigger glob expansion during the loop
  # eval without this substitution.
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`

  for p in `eval $output_verbose_link_cmd`; do
    case $p in

    -L* | -R* | -l*)
       # Some compilers place space between "-{L,R}" and the path.
       # Remove the space.
       if test $p = "-L" \
	  || test $p = "-R"; then
	 prev=$p
	 continue
       else
	 prev=
       fi

       if test "$pre_test_object_deps_done" = no; then
	 case $p in
	 -L* | -R*)
	   # Internal compiler library paths should come after those
	   # provided the user.  The postdeps already come after the
	   # user supplied libs so there is no need to process them.
	   if test -z "$compiler_lib_search_path_CXX"; then
	     compiler_lib_search_path_CXX="${prev}${p}"
	   else
	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
	   fi
	   ;;
	 # The "-l" case would never come before the object being
	 # linked, so don't bother handling this case.
	 esac
       else
	 if test -z "$postdeps_CXX"; then
	   postdeps_CXX="${prev}${p}"
	 else
	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
	 fi
       fi
       ;;

    *.$objext)
       # This assumes that the test object file only shows up
       # once in the compiler output.
       if test "$p" = "conftest.$objext"; then
	 pre_test_object_deps_done=yes
	 continue
       fi

       if test "$pre_test_object_deps_done" = no; then
	 if test -z "$predep_objects_CXX"; then
	   predep_objects_CXX="$p"
	 else
	   predep_objects_CXX="$predep_objects_CXX $p"
	 fi
       else
	 if test -z "$postdep_objects_CXX"; then
	   postdep_objects_CXX="$p"
	 else
	   postdep_objects_CXX="$postdep_objects_CXX $p"
	 fi
       fi
       ;;

    *) ;; # Ignore the rest.

    esac
  done

  # Clean up.
  rm -f a.out a.exe
else
  echo "libtool.m4: error: problem compiling CXX test program"
fi

$rm -f confest.$objext

compiler_lib_search_dirs_CXX=
if test -n "$compiler_lib_search_path_CXX"; then
  compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
fi

# PORTME: override above test on systems where it is broken
case $host_os in
interix[3-9]*)
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
  # hack all around it, let's just trust "g++" to DTRT.
  predep_objects_CXX=
  postdep_objects_CXX=
  postdeps_CXX=
  ;;

linux*)
  case `$CC -V 2>&1 | sed 5q` in
  *Sun\ C*)
    # Sun C++ 5.9
    #
    # The more standards-conforming stlport4 library is
    # incompatible with the Cstd library. Avoid specifying
    # it if it's in CXXFLAGS. Ignore libCrun as
    # -library=stlport4 depends on it.
    case " $CXX $CXXFLAGS " in
    *" -library=stlport4 "*)
      solaris_use_stlport4=yes
      ;;
    esac
    if test "$solaris_use_stlport4" != yes; then
      postdeps_CXX='-library=Cstd -library=Crun'
    fi
    ;;
  esac
  ;;

solaris*)
  case $cc_basename in
  CC*)
    # The more standards-conforming stlport4 library is
    # incompatible with the Cstd library. Avoid specifying
    # it if it's in CXXFLAGS. Ignore libCrun as
    # -library=stlport4 depends on it.
    case " $CXX $CXXFLAGS " in
    *" -library=stlport4 "*)
      solaris_use_stlport4=yes
      ;;
    esac

    # Adding this requires a known-good setup of shared libraries for
    # Sun compiler versions before 5.6, else PIC objects from an old
    # archive will be linked into the output, leading to subtle bugs.
    if test "$solaris_use_stlport4" != yes; then
      postdeps_CXX='-library=Cstd -library=Crun'
    fi
    ;;
  esac
  ;;
esac

case " $postdeps_CXX " in
*" -lc "*) archive_cmds_need_lc_CXX=no ;;
esac

lt_prog_compiler_wl_CXX=
lt_prog_compiler_pic_CXX=
lt_prog_compiler_static_CXX=

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
printf %s "checking for $compiler option to produce PIC... " >&6; }

  # C++ specific cases for pic, static, wl, etc.
  if test "$GXX" = yes; then
    lt_prog_compiler_wl_CXX='-Wl,'
    lt_prog_compiler_static_CXX='-static'

    case $host_os in
    aix*)
      # All AIX code is PIC.
      if test "$host_cpu" = ia64; then
	# AIX 5 now supports IA64 processor
	lt_prog_compiler_static_CXX='-Bstatic'
      fi
      ;;
    amigaos*)
      # FIXME: we need at least 68020 code to build shared libraries, but
      # adding the `-m68020' flag to GCC prevents building anything better,
      # like `-m68040'.
      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
      ;;
    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;
    mingw* | cygwin* | os2* | pw32*)
      # This hack is so that the source file can tell whether it is being
      # built for inclusion in a dll (and should export symbols for example).
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
      # (--disable-auto-import) libraries
	  lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
      ;;
    darwin* | rhapsody*)
      # PIC is the default on this platform
      # Common symbols not allowed in MH_DYLIB files
      lt_prog_compiler_pic_CXX='-fno-common'
      ;;
    *djgpp*)
      # DJGPP does not support shared libraries at all
      lt_prog_compiler_pic_CXX=
      ;;
    interix[3-9]*)
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
      # Instead, we relocate shared libraries at runtime.
      ;;
    sysv4*MP*)
      if test -d /usr/nec; then
	lt_prog_compiler_pic_CXX=-Kconform_pic
      fi
      ;;
    hpux*)
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
      # not for PA HP-UX.
      case $host_cpu in
      hppa*64*|ia64*)
	;;
      *)
	lt_prog_compiler_pic_CXX='-fPIC'
	;;
      esac
      ;;
    *)
      lt_prog_compiler_pic_CXX='-fPIC'
      ;;
    esac
  else
    case $host_os in
      aix[4-9]*)
	# All AIX code is PIC.
	if test "$host_cpu" = ia64; then
	  # AIX 5 now supports IA64 processor
	  lt_prog_compiler_static_CXX='-Bstatic'
	else
	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
	fi
	;;
      chorus*)
	case $cc_basename in
	cxch68*)
	  # Green Hills C++ Compiler
	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
	  ;;
	esac
	;;
       darwin*)
         # PIC is the default on this platform
         # Common symbols not allowed in MH_DYLIB files
         case $cc_basename in
           xlc*)
           lt_prog_compiler_pic_CXX='-qnocommon'
           lt_prog_compiler_wl_CXX='-Wl,'
           ;;
         esac
       ;;
      dgux*)
	case $cc_basename in
	  ec++*)
	    lt_prog_compiler_pic_CXX='-KPIC'
	    ;;
	  ghcx*)
	    # Green Hills C++ Compiler
	    lt_prog_compiler_pic_CXX='-pic'
	    ;;
	  *)
	    ;;
	esac
	;;
      freebsd* | dragonfly*)
	# FreeBSD uses GNU C++
	;;
      hpux9* | hpux10* | hpux11*)
	case $cc_basename in
	  CC*)
	    lt_prog_compiler_wl_CXX='-Wl,'
	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
	    if test "$host_cpu" != ia64; then
	      lt_prog_compiler_pic_CXX='+Z'
	    fi
	    ;;
	  aCC*)
	    lt_prog_compiler_wl_CXX='-Wl,'
	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
	    case $host_cpu in
	    hppa*64*|ia64*)
	      # +Z the default
	      ;;
	    *)
	      lt_prog_compiler_pic_CXX='+Z'
	      ;;
	    esac
	    ;;
	  *)
	    ;;
	esac
	;;
      interix*)
	# This is c89, which is MS Visual C++ (no shared libs)
	# Anyone wants to do a port?
	;;
      irix5* | irix6* | nonstopux*)
	case $cc_basename in
	  CC*)
	    lt_prog_compiler_wl_CXX='-Wl,'
	    lt_prog_compiler_static_CXX='-non_shared'
	    # CC pic flag -KPIC is the default.
	    ;;
	  *)
	    ;;
	esac
	;;
      linux* | k*bsd*-gnu)
	case $cc_basename in
	  KCC*)
	    # KAI C++ Compiler
	    lt_prog_compiler_wl_CXX='--backend -Wl,'
	    lt_prog_compiler_pic_CXX='-fPIC'
	    ;;
      ecpc*)
        # old Intel C++ for x86_64 which still supported -KPIC.
        lt_prog_compiler_wl_CXX='-Wl,'
        lt_prog_compiler_pic_CXX='-KPIC'
        lt_prog_compiler_static_CXX='-static'
        ;;
      icpc*)
        # Intel C++, used to be incompatible with GCC.
        lt_prog_compiler_wl_CXX='-Wl,'
        lt_prog_compiler_pic_CXX='-fPIC'
        lt_prog_compiler_static_CXX='-static'
        ;;
	  pgCC* | pgcpp*)
	    # Portland Group C++ compiler.
	    lt_prog_compiler_wl_CXX='-Wl,'
	    lt_prog_compiler_pic_CXX='-fpic'
	    lt_prog_compiler_static_CXX='-Bstatic'
	    ;;
	  cxx*)
	    # Compaq C++
	    # Make sure the PIC flag is empty.  It appears that all Alpha
	    # Linux and Compaq Tru64 Unix objects are PIC.
	    lt_prog_compiler_pic_CXX=
	    lt_prog_compiler_static_CXX='-non_shared'
	    ;;
	  *)
	    case `$CC -V 2>&1 | sed 5q` in
	    *Sun\ C*)
	      # Sun C++ 5.9
	      lt_prog_compiler_pic_CXX='-KPIC'
	      lt_prog_compiler_static_CXX='-Bstatic'
	      lt_prog_compiler_wl_CXX='-Qoption ld '
	      ;;
	    esac
	    ;;
	esac
	;;
      lynxos*)
	;;
      m88k*)
	;;
      mvs*)
	case $cc_basename in
	  cxx*)
	    lt_prog_compiler_pic_CXX='-W c,exportall'
	    ;;
	  *)
	    ;;
	esac
	;;
      netbsd*)
	;;
      osf3* | osf4* | osf5*)
	case $cc_basename in
	  KCC*)
	    lt_prog_compiler_wl_CXX='--backend -Wl,'
	    ;;
	  RCC*)
	    # Rational C++ 2.4.1
	    lt_prog_compiler_pic_CXX='-pic'
	    ;;
	  cxx*)
	    # Digital/Compaq C++
	    lt_prog_compiler_wl_CXX='-Wl,'
	    # Make sure the PIC flag is empty.  It appears that all Alpha
	    # Linux and Compaq Tru64 Unix objects are PIC.
	    lt_prog_compiler_pic_CXX=
	    lt_prog_compiler_static_CXX='-non_shared'
	    ;;
	  *)
	    ;;
	esac
	;;
      psos*)
	;;
      solaris*)
	case $cc_basename in
	  CC*)
	    # Sun C++ 4.2, 5.x and Centerline C++
	    lt_prog_compiler_pic_CXX='-KPIC'
	    lt_prog_compiler_static_CXX='-Bstatic'
	    lt_prog_compiler_wl_CXX='-Qoption ld '
	    ;;
	  gcx*)
	    # Green Hills C++ Compiler
	    lt_prog_compiler_pic_CXX='-PIC'
	    ;;
	  *)
	    ;;
	esac
	;;
      sunos4*)
	case $cc_basename in
	  CC*)
	    # Sun C++ 4.x
	    lt_prog_compiler_pic_CXX='-pic'
	    lt_prog_compiler_static_CXX='-Bstatic'
	    ;;
	  lcc*)
	    # Lucid
	    lt_prog_compiler_pic_CXX='-pic'
	    ;;
	  *)
	    ;;
	esac
	;;
      tandem*)
	case $cc_basename in
	  NCC*)
	    # NonStop-UX NCC 3.20
	    lt_prog_compiler_pic_CXX='-KPIC'
	    ;;
	  *)
	    ;;
	esac
	;;
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
	case $cc_basename in
	  CC*)
	    lt_prog_compiler_wl_CXX='-Wl,'
	    lt_prog_compiler_pic_CXX='-KPIC'
	    lt_prog_compiler_static_CXX='-Bstatic'
	    ;;
	esac
	;;
      vxworks*)
	;;
      *)
	lt_prog_compiler_can_build_shared_CXX=no
	;;
    esac
  fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
printf "%s\n" "$lt_prog_compiler_pic_CXX" >&6; }

#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic_CXX"; then

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
if test ${lt_cv_prog_compiler_pic_works_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_prog_compiler_pic_works_CXX=no
  ac_outfile=conftest.$ac_objext
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
   # Insert the option either (1) after the last *FLAGS variable, or
   # (2) before a word containing "conftest.", or (3) at the end.
   # Note that $ac_compile itself does not contain backslashes and begins
   # with a dollar sign (not a hyphen), so the echo should work correctly.
   # The option is referenced via a variable to avoid confusing sed.
   lt_compile=`echo "$ac_compile" | $SED \
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   -e 's:$: $lt_compiler_flag:'`
   (eval echo "\"configure:92596: $lt_compile\"" >&5)
   (eval "$lt_compile" 2>conftest.err)
   ac_status=$?
   cat conftest.err >&5
   echo "configure:92600: \$? = $ac_status" >&5
   if (exit $ac_status) && test -s "$ac_outfile"; then
     # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings other than the usual output.
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
       lt_cv_prog_compiler_pic_works_CXX=yes
     fi
   fi
   $rm conftest*
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; }

if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
    case $lt_prog_compiler_pic_CXX in
     "" | " "*) ;;
     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
     esac
else
    lt_prog_compiler_pic_CXX=
     lt_prog_compiler_can_build_shared_CXX=no
fi

fi
case $host_os in
  # For platforms which do not support PIC, -DPIC is meaningless:
  *djgpp*)
    lt_prog_compiler_pic_CXX=
    ;;
  *)
    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
    ;;
esac

#
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
if test ${lt_cv_prog_compiler_static_works_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_prog_compiler_static_works_CXX=no
   save_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
     # The linker can only warn and ignore the option if not recognized
     # So say no if there are warnings
     if test -s conftest.err; then
       # Append any errors to the config.log.
       cat conftest.err 1>&5
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
       if diff conftest.exp conftest.er2 >/dev/null; then
         lt_cv_prog_compiler_static_works_CXX=yes
       fi
     else
       lt_cv_prog_compiler_static_works_CXX=yes
     fi
   fi
   $rm -r conftest*
   LDFLAGS="$save_LDFLAGS"
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; }

if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
    :
else
    lt_prog_compiler_static_CXX=
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o_CXX+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_prog_compiler_c_o_CXX=no
   $rm -r conftest 2>/dev/null
   mkdir conftest
   cd conftest
   mkdir out
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext

   lt_compiler_flag="-o out/conftest2.$ac_objext"
   # Insert the option either (1) after the last *FLAGS variable, or
   # (2) before a word containing "conftest.", or (3) at the end.
   # Note that $ac_compile itself does not contain backslashes and begins
   # with a dollar sign (not a hyphen), so the echo should work correctly.
   lt_compile=`echo "$ac_compile" | $SED \
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   -e 's:$: $lt_compiler_flag:'`
   (eval echo "\"configure:92704: $lt_compile\"" >&5)
   (eval "$lt_compile" 2>out/conftest.err)
   ac_status=$?
   cat out/conftest.err >&5
   echo "configure:92708: \$? = $ac_status" >&5
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
   then
     # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
       lt_cv_prog_compiler_c_o_CXX=yes
     fi
   fi
   chmod u+w . 2>&5
   $rm conftest*
   # SGI C++ compiler will create directory out/ii_files/ for
   # template instantiation
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
   $rm out/* && rmdir out
   cd ..
   rmdir conftest
   $rm conftest*
 ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }


hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
  # do not overwrite the value of need_locks provided by the user
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
printf %s "checking if we can lock with hard links... " >&6; }
  hard_links=yes
  $rm conftest*
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
  touch conftest.a
  ln conftest.a conftest.b 2>&5 || hard_links=no
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
printf "%s\n" "$hard_links" >&6; }
  if test "$hard_links" = no; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
    need_locks=warn
  fi
else
  need_locks=no
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }

  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  case $host_os in
  aix[4-9]*)
    # If we're using GNU nm, then we don't want the "-C" option.
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
    else
      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
    fi
    ;;
  pw32*)
    export_symbols_cmds_CXX="$ltdll_cmds"
  ;;
  cygwin* | mingw*)
    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
  ;;
  *)
    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  ;;
  esac
  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
printf "%s\n" "$ld_shlibs_CXX" >&6; }
test "$ld_shlibs_CXX" = no && can_build_shared=no

#
# Do we need to explicitly link libc?
#
case "x$archive_cmds_need_lc_CXX" in
x|xyes)
  # Assume -lc should be added
  archive_cmds_need_lc_CXX=yes

  if test "$enable_shared" = yes && test "$GCC" = yes; then
    case $archive_cmds_CXX in
    *'~'*)
      # FIXME: we may have to deal with multi-command sequences.
      ;;
    '$CC '*)
      # Test whether the compiler implicitly links with -lc since on some
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
      # to ld, don't add -lc before -lgcc.
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
printf %s "checking whether -lc should be explicitly linked in... " >&6; }
      $rm conftest*
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext

      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } 2>conftest.err; then
        soname=conftest
        lib=conftest
        libobjs=conftest.$ac_objext
        deplibs=
        wl=$lt_prog_compiler_wl_CXX
	pic_flag=$lt_prog_compiler_pic_CXX
        compiler_flags=-v
        linker_flags=-v
        verstring=
        output_objdir=.
        libname=conftest
        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
        allow_undefined_flag_CXX=
        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
        then
	  archive_cmds_need_lc_CXX=no
        else
	  archive_cmds_need_lc_CXX=yes
        fi
        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
      else
        cat conftest.err 1>&5
      fi
      $rm conftest*
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
printf "%s\n" "$archive_cmds_need_lc_CXX" >&6; }
      ;;
    esac
  fi
  ;;
esac

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
printf %s "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
finish_eval=
shlibpath_var=
shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"

need_lib_prefix=unknown
hardcode_into_libs=no

# when you set need_version to no, make sure it does not cause -set_version
# flags to be left without arguments
need_version=unknown

case $host_os in
aix3*)
  version_type=linux
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  shlibpath_var=LIBPATH

  # AIX 3 has no versioning support, so we append a major version to the name.
  soname_spec='${libname}${release}${shared_ext}$major'
  ;;

aix[4-9]*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  hardcode_into_libs=yes
  if test "$host_cpu" = ia64; then
    # AIX 5 supports IA64
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
    shlibpath_var=LD_LIBRARY_PATH
  else
    # With GCC up to 2.95.x, collect2 would create an import file
    # for dependence libraries.  The import file would start with
    # the line `#! .'.  This would cause the generated library to
    # depend on `.', always an invalid library.  This was fixed in
    # development snapshots of GCC prior to 3.0.
    case $host_os in
      aix4 | aix4.[01] | aix4.[01].*)
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
	   echo ' yes '
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
	:
      else
	can_build_shared=no
      fi
      ;;
    esac
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
    # soname into executable. Probably we can add versioning support to
    # collect2, so additional links can be useful in future.
    if test "$aix_use_runtimelinking" = yes; then
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
      # instead of lib<name>.a to let people know that these are not
      # typical AIX shared libraries.
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
    else
      # We preserve .a as extension for shared libraries through AIX4.2
      # and later when we are not doing run time linking.
      library_names_spec='${libname}${release}.a $libname.a'
      soname_spec='${libname}${release}${shared_ext}$major'
    fi
    shlibpath_var=LIBPATH
  fi
  ;;

amigaos*)
  library_names_spec='$libname.ixlibrary $libname.a'
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  ;;

beos*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  shlibpath_var=LIBRARY_PATH
  ;;

haiku*)
  # Since haiku provides gcc, use GNU style here
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  hardcode_into_libs=yes
  ;;

bsdi[45]*)
  version_type=linux
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  shlibpath_var=LD_LIBRARY_PATH
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  # the default ld.so.conf also contains /usr/contrib/lib and
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  # libtool to hard-code these into programs
  ;;

cygwin* | mingw* | pw32*)
  version_type=windows
  shrext_cmds=".dll"
  need_version=no
  need_lib_prefix=no

  case $GCC,$host_os in
  yes,cygwin* | yes,mingw* | yes,pw32*)
    library_names_spec='$libname.dll.a'
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
    postinstall_cmds='base_file=`basename \${file}`~
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
      dldir=$destdir/`dirname \$dlpath`~
      test -d \$dldir || mkdir -p \$dldir~
      $install_prog $dir/$dlname \$dldir/$dlname~
      chmod a+x \$dldir/$dlname'
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
      dlpath=$dir/\$dldll~
       $rm \$dlpath'
    shlibpath_overrides_runpath=yes

    case $host_os in
    cygwin*)
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
      ;;
    mingw*)
      # MinGW DLLs use traditional 'lib' prefix
      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
        # It is most probably a Windows format PATH printed by
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
        # path with ; separators, and with drive letters. We can handle the
        # drive letters (cygwin fileutils understands them), so leave them,
        # especially as we might pass files found there to a mingw objdump,
        # which wouldn't understand a cygwinified path. Ahh.
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
      else
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
      fi
      ;;
    pw32*)
      # pw32 DLLs use 'pw' prefix rather than 'lib'
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
      ;;
    esac
    ;;

  *)
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
    ;;
  esac
  dynamic_linker='Win32 ld.exe'
  # FIXME: first we should search . and the directory the executable is in
  shlibpath_var=PATH
  ;;

darwin* | rhapsody*)
  dynamic_linker="$host_os dyld"
  version_type=darwin
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  soname_spec='${libname}${release}${major}$shared_ext'
  shlibpath_overrides_runpath=yes
  shlibpath_var=DYLD_LIBRARY_PATH
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'

  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  ;;

dgux*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  ;;

freebsd* | dragonfly*)
  # DragonFly does not have aout.  When/if they implement a new
  # versioning mechanism, adjust this.
  if test -x /usr/bin/objformat; then
    objformat=`/usr/bin/objformat`
  else
    case $host_os in
    freebsd[123].*) objformat=aout ;;
    *) objformat=elf ;;
    esac
  fi
  version_type=freebsd-$objformat
  case $version_type in
    freebsd-elf*)
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
      need_version=no
      need_lib_prefix=no
      ;;
    freebsd-*)
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
      need_version=yes
      ;;
  esac
  shlibpath_var=LD_LIBRARY_PATH
  case $host_os in
  freebsd2*)
    shlibpath_overrides_runpath=yes
    ;;
  freebsd3.[01]* | freebsdelf3.[01]*)
    shlibpath_overrides_runpath=yes
    hardcode_into_libs=yes
    ;;
  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
    shlibpath_overrides_runpath=no
    hardcode_into_libs=yes
    ;;
  *) # from 4.6 on, and DragonFly
    shlibpath_overrides_runpath=yes
    hardcode_into_libs=yes
    ;;
  esac
  ;;

gnu*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  hardcode_into_libs=yes
  ;;

hpux9* | hpux10* | hpux11*)
  # Give a soname corresponding to the major version so that dld.sl refuses to
  # link against other versions.
  version_type=sunos
  need_lib_prefix=no
  need_version=no
  case $host_cpu in
  ia64*)
    shrext_cmds='.so'
    hardcode_into_libs=yes
    dynamic_linker="$host_os dld.so"
    shlibpath_var=LD_LIBRARY_PATH
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
    soname_spec='${libname}${release}${shared_ext}$major'
    if test "X$HPUX_IA64_MODE" = X32; then
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
    else
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
    fi
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
    ;;
   hppa*64*)
     shrext_cmds='.sl'
     hardcode_into_libs=yes
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
     soname_spec='${libname}${release}${shared_ext}$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   *)
    shrext_cmds='.sl'
    dynamic_linker="$host_os dld.sl"
    shlibpath_var=SHLIB_PATH
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
    soname_spec='${libname}${release}${shared_ext}$major'
    ;;
  esac
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
  postinstall_cmds='chmod 555 $lib'
  ;;

interix[3-9]*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=no
  hardcode_into_libs=yes
  ;;

irix5* | irix6* | nonstopux*)
  case $host_os in
    nonstopux*) version_type=nonstopux ;;
    *)
	if test "$lt_cv_prog_gnu_ld" = yes; then
		version_type=linux
	else
		version_type=irix
	fi ;;
  esac
  need_lib_prefix=no
  need_version=no
  soname_spec='${libname}${release}${shared_ext}$major'
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  case $host_os in
  irix5* | nonstopux*)
    libsuff= shlibsuff=
    ;;
  *)
    case $LD in # libtool.m4 will add one of these switches to LD
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
      libsuff= shlibsuff= libmagic=32-bit;;
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
      libsuff=32 shlibsuff=N32 libmagic=N32;;
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
    *) libsuff= shlibsuff= libmagic=never-match;;
    esac
    ;;
  esac
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  shlibpath_overrides_runpath=no
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  hardcode_into_libs=yes
  ;;

# No shared lib support for Linux oldld, aout, or coff.
linux*oldld* | linux*aout* | linux*coff*)
  dynamic_linker=no
  ;;

# This must be Linux ELF.
linux* | k*bsd*-gnu)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=no
  # This implies no fast_install, which is unacceptable.
  # Some rework will be needed to allow for fast_install
  # before this can be enabled.
  hardcode_into_libs=yes

  # Append ld.so.conf contents to the search path
  if test -f /etc/ld.so.conf; then
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  fi

  # We used to test for /lib/ld.so.1 and disable shared libraries on
  # powerpc, because MkLinux only supported shared libraries with the
  # GNU dynamic linker.  Since this was broken with cross compilers,
  # most powerpc-linux boxes support dynamic linking these days and
  # people can always --disable-shared, the test was removed, and we
  # assume the GNU/Linux dynamic linker is in use.
  dynamic_linker='GNU/Linux ld.so'
  ;;

netbsd*)
  version_type=sunos
  need_lib_prefix=no
  need_version=no
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
    dynamic_linker='NetBSD (a.out) ld.so'
  else
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
    soname_spec='${libname}${release}${shared_ext}$major'
    dynamic_linker='NetBSD ld.elf_so'
  fi
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  hardcode_into_libs=yes
  ;;

newsos6)
  version_type=linux
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  ;;

nto-qnx*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  ;;

openbsd*)
  version_type=sunos
  sys_lib_dlsearch_path_spec="/usr/lib"
  need_lib_prefix=no
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  case $host_os in
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
    *)                         need_version=no  ;;
  esac
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  shlibpath_var=LD_LIBRARY_PATH
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
    case $host_os in
      openbsd2.[89] | openbsd2.[89].*)
	shlibpath_overrides_runpath=no
	;;
      *)
	shlibpath_overrides_runpath=yes
	;;
      esac
  else
    shlibpath_overrides_runpath=yes
  fi
  ;;

os2*)
  libname_spec='$name'
  shrext_cmds=".dll"
  need_lib_prefix=no
  library_names_spec='$libname${shared_ext} $libname.a'
  dynamic_linker='OS/2 ld.exe'
  shlibpath_var=LIBPATH
  ;;

osf3* | osf4* | osf5*)
  version_type=osf
  need_lib_prefix=no
  need_version=no
  soname_spec='${libname}${release}${shared_ext}$major'
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  shlibpath_var=LD_LIBRARY_PATH
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  ;;

rdos*)
  dynamic_linker=no
  ;;

solaris*)
  version_type=linux
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  hardcode_into_libs=yes
  # ldd complains unless libraries are executable
  postinstall_cmds='chmod +x $lib'
  ;;

sunos4*)
  version_type=sunos
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  shlibpath_var=LD_LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  if test "$with_gnu_ld" = yes; then
    need_lib_prefix=no
  fi
  need_version=yes
  ;;

sysv4 | sysv4.3*)
  version_type=linux
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  case $host_vendor in
    sni)
      shlibpath_overrides_runpath=no
      need_lib_prefix=no
      export_dynamic_flag_spec='${wl}-Blargedynsym'
      runpath_var=LD_RUN_PATH
      ;;
    siemens)
      need_lib_prefix=no
      ;;
    motorola)
      need_lib_prefix=no
      need_version=no
      shlibpath_overrides_runpath=no
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
      ;;
  esac
  ;;

sysv4*MP*)
  if test -d /usr/nec ;then
    version_type=linux
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
    soname_spec='$libname${shared_ext}.$major'
    shlibpath_var=LD_LIBRARY_PATH
  fi
  ;;

sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  version_type=freebsd-elf
  need_lib_prefix=no
  need_version=no
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  hardcode_into_libs=yes
  if test "$with_gnu_ld" = yes; then
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
    shlibpath_overrides_runpath=no
  else
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
    shlibpath_overrides_runpath=yes
    case $host_os in
      sco3.2v5*)
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
	;;
    esac
  fi
  sys_lib_dlsearch_path_spec='/usr/lib'
  ;;

uts4*)
  version_type=linux
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LD_LIBRARY_PATH
  ;;

*)
  dynamic_linker=no
  ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
printf "%s\n" "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no

if test ${lt_cv_sys_lib_search_path_spec+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" ;;
esac
fi

sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
if test ${lt_cv_sys_lib_dlsearch_path_spec+y}
then :
  printf %s "(cached) " >&6
else case e in #(
  e) lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" ;;
esac
fi

sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"

variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
printf %s "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_CXX=
if test -n "$hardcode_libdir_flag_spec_CXX" || \
   test -n "$runpath_var_CXX" || \
   test "X$hardcode_automatic_CXX" = "Xyes" ; then

  # We can hardcode non-existent directories.
  if test "$hardcode_direct_CXX" != no &&
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
     # have to relink, otherwise we might link with an installed library
     # when we should be linking with a yet-to-be-installed one
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
     test "$hardcode_minus_L_CXX" != no; then
    # Linking always hardcodes the temporary library directory.
    hardcode_action_CXX=relink
  else
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
    hardcode_action_CXX=immediate
  fi
else
  # We cannot hardcode anything, or else we can only hardcode existing
  # directories.
  hardcode_action_CXX=unsupported
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
printf "%s\n" "$hardcode_action_CXX" >&6; }

if test "$hardcode_action_CXX" = relink; then
  # Fast installation is not supported
  enable_fast_install=no
elif test "$shlibpath_overrides_runpath" = yes ||
     test "$enable_shared" = no; then
  # Fast installation is not necessary
  enable_fast_install=needless
fi


# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
# with your package, and you will get complaints that there are
# no rules to generate ltmain.sh.
if test -f "$ltmain"; then
  # See if we are running on zsh, and set the options which allow our commands through
  # without removal of \ escapes.
  if test -n "${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
  fi
  # Now quote all the things that may contain metacharacters while being
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
  # variables and quote the copies for generation of the libtool script.
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
    SED SHELL STRIP \
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
    deplibs_check_method reload_flag reload_cmds need_locks \
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
    lt_cv_sys_global_symbol_to_c_name_address \
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
    old_postinstall_cmds old_postuninstall_cmds \
    compiler_CXX \
    CC_CXX \
    LD_CXX \
    lt_prog_compiler_wl_CXX \
    lt_prog_compiler_pic_CXX \
    lt_prog_compiler_static_CXX \
    lt_prog_compiler_no_builtin_flag_CXX \
    export_dynamic_flag_spec_CXX \
    thread_safe_flag_spec_CXX \
    whole_archive_flag_spec_CXX \
    enable_shared_with_static_runtimes_CXX \
    old_archive_cmds_CXX \
    old_archive_from_new_cmds_CXX \
    predep_objects_CXX \
    postdep_objects_CXX \
    predeps_CXX \
    postdeps_CXX \
    compiler_lib_search_path_CXX \
    compiler_lib_search_dirs_CXX \
    archive_cmds_CXX \
    archive_expsym_cmds_CXX \
    postinstall_cmds_CXX \
    postuninstall_cmds_CXX \
    old_archive_from_expsyms_cmds_CXX \
    allow_undefined_flag_CXX \
    no_undefined_flag_CXX \
    export_symbols_cmds_CXX \
    hardcode_libdir_flag_spec_CXX \
    hardcode_libdir_flag_spec_ld_CXX \
    hardcode_libdir_separator_CXX \
    hardcode_automatic_CXX \
    module_cmds_CXX \
    module_expsym_cmds_CXX \
    lt_cv_prog_compiler_c_o_CXX \
    fix_srcfile_path_CXX \
    exclude_expsyms_CXX \
    include_expsyms_CXX; do

    case $var in
    old_archive_cmds_CXX | \
    old_archive_from_new_cmds_CXX | \
    archive_cmds_CXX | \
    archive_expsym_cmds_CXX | \
    module_cmds_CXX | \
    module_expsym_cmds_CXX | \
    old_archive_from_expsyms_cmds_CXX | \
    export_symbols_cmds_CXX | \
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
    postinstall_cmds | postuninstall_cmds | \
    old_postinstall_cmds | old_postuninstall_cmds | \
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
      # Double-quote double-evaled strings.
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
      ;;
    *)
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
      ;;
    esac
  done

  case $lt_echo in
  *'\$0 --fallback-echo"')
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
    ;;
  esac

cfgfile="$ofile"

  cat <<__EOF__ >> "$cfgfile"
# ### BEGIN LIBTOOL TAG CONFIG: $tagname

# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:

# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL

# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared

# Whether or not to build static libraries.
build_old_libs=$enable_static

# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=$archive_cmds_need_lc_CXX

# Whether or not to disallow shared libs when runtime libs are static
allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX

# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install

# The host system.
host_alias=$host_alias
host=$host
host_os=$host_os

# The build system.
build_alias=$build_alias
build=$build
build_os=$build_os

# An echo program that does not interpret backslashes.
echo=$lt_echo

# The archiver.
AR=$lt_AR
AR_FLAGS=$lt_AR_FLAGS

# A C compiler.
LTCC=$lt_LTCC

# LTCC compiler flags.
LTCFLAGS=$lt_LTCFLAGS

# A language-specific compiler.
CC=$lt_compiler_CXX

# Is the compiler the GNU C compiler?
with_gcc=$GCC_CXX

# An ERE matcher.
EGREP=$lt_EGREP

# The linker used to build libraries.
LD=$lt_LD_CXX

# Whether we need hard or soft links.
LN_S=$lt_LN_S

# A BSD-compatible nm program.
NM=$lt_NM

# A symbol stripping program
STRIP=$lt_STRIP

# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD

# Used on cygwin: DLL creation program.
DLLTOOL="$DLLTOOL"

# Used on cygwin: object dumper.
OBJDUMP="$OBJDUMP"

# Used on cygwin: assembler.
AS="$AS"

# The name of the directory that contains temporary libtool files.
objdir=$objdir

# How to create reloadable object files.
reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds

# How to pass a linker flag through the compiler.
wl=$lt_lt_prog_compiler_wl_CXX

# Object file suffix (normally "o").
objext="$ac_objext"

# Old archive suffix (normally "a").
libext="$libext"

# Shared library suffix (normally ".so").
shrext_cmds='$shrext_cmds'

# Executable file suffix (normally "").
exeext="$exeext"

# Additional compiler flags for building library objects.
pic_flag=$lt_lt_prog_compiler_pic_CXX
pic_mode=$pic_mode

# What is the maximum length of a command?
max_cmd_len=$lt_cv_sys_max_cmd_len

# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX

# Must we lock files when doing compilation?
need_locks=$lt_need_locks

# Do we need the lib prefix for modules?
need_lib_prefix=$need_lib_prefix

# Do we need a version for libraries?
need_version=$need_version

# Whether dlopen is supported.
dlopen_support=$enable_dlopen

# Whether dlopen of programs is supported.
dlopen_self=$enable_dlopen_self

# Whether dlopen of statically linked programs is supported.
dlopen_self_static=$enable_dlopen_self_static

# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static_CXX

# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX

# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX

# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX

# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX

# Library versioning type.
version_type=$version_type

# Format of library name prefix.
libname_spec=$lt_libname_spec

# List of archive names.  First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec=$lt_library_names_spec

# The coded name of the library, if different from the real name.
soname_spec=$lt_soname_spec

# Commands used to build and install an old-style archive.
RANLIB=$lt_RANLIB
old_archive_cmds=$lt_old_archive_cmds_CXX
old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds

# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX

# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX

# Commands used to build and install a shared archive.
archive_cmds=$lt_archive_cmds_CXX
archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
postinstall_cmds=$lt_postinstall_cmds
postuninstall_cmds=$lt_postuninstall_cmds

# Commands used to build a loadable module (assumed same as above if empty)
module_cmds=$lt_module_cmds_CXX
module_expsym_cmds=$lt_module_expsym_cmds_CXX

# Commands to strip libraries.
old_striplib=$lt_old_striplib
striplib=$lt_striplib

# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects=$lt_predep_objects_CXX

# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects=$lt_postdep_objects_CXX

# Dependencies to place before the objects being linked to create a
# shared library.
predeps=$lt_predeps_CXX

# Dependencies to place after the objects being linked to create a
# shared library.
postdeps=$lt_postdeps_CXX

# The directories searched by this compiler when creating a shared
# library
compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX

# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_CXX

# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method

# Command to use when deplibs_check_method == file_magic.
file_magic_cmd=$lt_file_magic_cmd

# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=$lt_allow_undefined_flag_CXX

# Flag that forces no undefined symbols.
no_undefined_flag=$lt_no_undefined_flag_CXX

# Commands used to finish a libtool library installation in a directory.
finish_cmds=$lt_finish_cmds

# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=$lt_finish_eval

# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe

# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl

# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address

# This is the shared library runtime path variable.
runpath_var=$runpath_var

# This is the shared library path variable.
shlibpath_var=$shlibpath_var

# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=$shlibpath_overrides_runpath

# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action_CXX

# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs

# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX

# If ld is used when linking, flag to hardcode \$libdir into
# a binary during linking. This must work even if \$libdir does
# not exist.
hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX

# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX

# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
# resulting binary.
hardcode_direct=$hardcode_direct_CXX

# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L=$hardcode_minus_L_CXX

# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX

# Set to yes if building a shared library automatically hardcodes DIR into the library
# and all subsequent libraries and executables linked against it.
hardcode_automatic=$hardcode_automatic_CXX

# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="$variables_saved_for_relink"

# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs_CXX

# Compile-time system search path for libraries
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec

# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec

# Fix the shell variable \$srcfile for the compiler.
fix_srcfile_path=$lt_fix_srcfile_path

# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_CXX

# The commands to list exported symbols.
export_symbols_cmds=$lt_export_symbols_cmds_CXX

# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$lt_extract_expsyms_cmds

# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms=$lt_exclude_expsyms_CXX

# Symbols that must always be exported.
include_expsyms=$lt_include_expsyms_CXX

# ### END LIBTOOL TAG CONFIG: $tagname

__EOF__


else
  # If there is no Makefile yet, we rely on a make rule to execute
  # `config.status --recheck' to rerun these tests and create the
  # libtool script then.
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  if test -f "$ltmain_in"; then
    test -f Makefile && make "$ltmain"
  fi
fi


ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CC=$lt_save_CC
LDCXX=$LD
LD=$lt_save_LD
GCC=$lt_save_GCC
with_gnu_ldcxx=$with_gnu_ld
with_gnu_ld=$lt_save_with_gnu_ld
lt_cv_path_LDCXX=$lt_cv_path_LD
lt_cv_path_LD=$lt_save_path_LD
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld

	else
	  tagname=""
	fi
	;;

      *)
	as_fn_error $? "Unsupported tag name: $tagname" "$LINENO" 5
	;;
      esac

      # Append the new tag name to the list of available tags.
      if test -n "$tagname" ; then
      available_tags="$available_tags $tagname"
    fi
    fi
  done
  IFS="$lt_save_ifs"

  # Now substitute the updated list of available tags.
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
    mv "${ofile}T" "$ofile"
    chmod +x "$ofile"
  else
    rm -f "${ofile}T"
    as_fn_error $? "unable to update list of available tagged configurations." "$LINENO" 5
  fi
fi



# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"

# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'

# Prevent multiple expansion












if ${LIBTOOL:+false} :
then :
  LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
else case e in #(
  e) LIBTOOL="$LIBTOOL --silent" ;;
esac
fi



if ${LIBTOOL:+false} :
then :
  LIBTOOL='$(SHELL) $(top_builddir)/libtool --preserve-dup-deps'
else case e in #(
  e) LIBTOOL="$LIBTOOL --preserve-dup-deps" ;;
esac
fi



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
printf "%s\n" "" >&6; }
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${T_MD}Generating files${T_ME}" >&5
printf "%s\n" "${T_MD}Generating files${T_ME}" >&6; }


CXXFLAGS_CLEAN=$CXXFLAGS
CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)"
CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"

if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then
  pharcmd=pharcmd
  pharcmd_install=install-pharcmd
else
  pharcmd=
  pharcmd_install=
fi;

all_targets="\$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_ZEND_EX) \$(PHP_BINARIES) $pharcmd"
install_targets="$install_sapi $install_modules $install_binaries install-build install-headers install-programs $install_pear $pharcmd_install"


  PHP_VAR_SUBST="$PHP_VAR_SUBST all_targets"


  PHP_VAR_SUBST="$PHP_VAR_SUBST install_targets"


  PHP_VAR_SUBST="$PHP_VAR_SUBST install_binary_targets"



    for header_file in Zend/ TSRM/ main/ main/streams/; do


  unique=$(echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
  fi

    done



    header_path=Zend/Optimizer
    for header_file in zend_call_graph.h zend_cfg.h zend_dfg.h zend_dump.h zend_func_info.h zend_inference.h zend_optimizer.h zend_ssa.h zend_worklist.h; do
      hp_hf="$header_path/$header_file"


  unique=$(echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g')

  cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
  if test -n "$unique" && test "$(eval $cmd)" = "" ; then
    eval "INSTALLHEADERS$unique=set"
    INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  fi

    done





  case TSRM in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "TSRM"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/TSRM/"; ac_bdir="TSRM/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in TSRM.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done





  case main in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "main"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/main/"; ac_bdir="main/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in explicit_bzero.c fopen_wrappers.c getopt.c main.c network.c output.c php_content_types.c php_ini_builder.c php_ini.c php_glob.c php_odbc_utils.c php_open_temporary_file.c php_scandir.c php_syslog.c php_ticks.c php_variables.c reentrancy.c rfc1867.c safe_bcmp.c SAPI.c snprintf.c spprintf.c strlcat.c strlcpy.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done



if printf "#if __ELF__\nelf\n#endif\n" | $CC -E - | grep elf > /dev/null; then


  case main in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "main"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/main/"; ac_bdir="main/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in debug_gdb_scripts.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta  -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done



  cat >> Makefile.objects <<EOF
$abs_srcdir/main/debug_gdb_scripts.c: $abs_srcdir/scripts/gdb/debug_gdb_scripts_gen.php $abs_srcdir/scripts/gdb/php_gdb.py $abs_srcdir/.gdbinit
	@if test ! -z "\$(PHP)"; then \\
		\$(PHP) $abs_srcdir/scripts/gdb/debug_gdb_scripts_gen.php; \\
	fi;
EOF
fi


  case main in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "main"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/main/"; ac_bdir="main/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in fastcgi.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_FASTCGI_OBJS="$PHP_FASTCGI_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done




  case main/streams in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "main/streams"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/main/streams/"; ac_bdir="main/streams/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in cast.c filter.c glob_wrapper.c memory.c mmap.c plain_wrapper.c streams.c transports.c userspace.c xp_socket.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done





  case /main in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "/main"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir//main/"; ac_bdir="/main/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in internal_functions.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done



  case /main in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "/main"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir//main/"; ac_bdir="/main/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in internal_functions_cli.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_BINARY_OBJS="$PHP_BINARY_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done




  case Zend in
  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  /*) ac_srcdir=$(echo "Zend"|cut -c 2-)"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  *) ac_srcdir="$abs_srcdir/Zend/"; ac_bdir="Zend/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  esac



  b_c_pre=$php_c_pre
  b_cxx_pre=$php_cxx_pre
  b_c_meta=$php_c_meta
  b_cxx_meta=$php_cxx_meta
  b_c_post=$php_c_post
  b_cxx_post=$php_cxx_post
  b_lo=$php_lo


  old_IFS=$IFS
  for ac_src in Optimizer/block_pass.c Optimizer/compact_literals.c Optimizer/compact_vars.c Optimizer/dce.c Optimizer/dfa_pass.c Optimizer/escape_analysis.c Optimizer/nop_removal.c Optimizer/optimize_func_calls.c Optimizer/optimize_temp_vars_5.c Optimizer/pass1.c Optimizer/pass3.c Optimizer/sccp.c Optimizer/scdf.c Optimizer/zend_call_graph.c Optimizer/zend_cfg.c Optimizer/zend_dfg.c Optimizer/zend_dump.c Optimizer/zend_func_info.c Optimizer/zend_inference.c Optimizer/zend_optimizer.c Optimizer/zend_ssa.c zend_alloc.c zend_API.c zend_ast.c zend_atomic.c zend_attributes.c zend_builtin_functions.c zend_call_stack.c zend_closures.c zend_compile.c zend_constants.c zend_cpuinfo.c zend_default_classes.c zend_dtrace.c zend_enum.c zend_exceptions.c zend_execute_API.c zend_execute.c zend_extensions.c zend_fibers.c zend_float.c zend_frameless_function.c zend_gc.c zend_gdb.c zend_generators.c zend_hash.c zend_highlight.c zend_hrtime.c zend_inheritance.c zend_ini_parser.c zend_ini_scanner.c zend_ini.c zend_interfaces.c zend_iterators.c zend_language_parser.c zend_language_scanner.c zend_lazy_objects.c zend_list.c zend_llist.c zend_max_execution_timer.c zend_multibyte.c zend_object_handlers.c zend_objects_API.c zend_objects.c zend_observer.c zend_opcode.c zend_operators.c zend_property_hooks.c zend_ptr_stack.c zend_signal.c zend_smart_str.c zend_sort.c zend_stack.c zend_stream.c zend_string.c zend_strtod.c zend_system_id.c zend_variables.c zend_virtual_cwd.c zend_vm_opcodes.c zend_weakrefs.c zend.c; do

      IFS=.
      set $ac_src
      ac_obj=$1
      IFS=$old_IFS

      PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"

      case $ac_src in
        *.c) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $fiber_asm_cflag -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.s) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $fiber_asm_cflag -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.S) ac_comp="$b_c_pre $ac_inc $b_c_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $fiber_asm_cflag -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $fiber_asm_cflag -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
      esac

      ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir$ac_obj.lo"

    cat >>Makefile.objects<<EOF
-include $ac_bdir$ac_obj.dep
$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
	$ac_comp
EOF
  done



  src=$abs_srcdir/scripts/Makefile.frag
  ac_srcdir=$abs_srcdir/scripts
  ac_builddir=scripts
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments

  src=$abs_srcdir/Zend/Makefile.frag
  ac_srcdir=$abs_srcdir/Zend
  ac_builddir=Zend
  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments



printf "%s\n" "#define HAVE_BUILD_DEFS_H 1" >>confdefs.h


as_fn_append BUILD_DIR " main main/streams scripts scripts/man1 TSRM Zend Zend/asm Zend/Optimizer"


ac_config_files="$ac_config_files main/build-defs.h scripts/man1/php-config.1 scripts/man1/phpize.1 scripts/php-config scripts/phpize"




ac_config_commands="$ac_config_commands Zend/zend_config.h"


ac_config_commands="$ac_config_commands main/internal_functions.c"


ac_config_commands="$ac_config_commands main/internal_functions_cli.c"


ac_config_commands="$ac_config_commands default"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# 'ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* 'ac_cv_foo' will be assigned the
# following values.

_ACEOF

# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      # 'set' does not quote correctly, so add quotes: double-quote
      # substitution turns \\\\ into \\, and sed turns \\ into \.
      sed -n \
	"s/'/'\\\\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;; #(
    *)
      # 'set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    if test "x$cache_file" != "x/dev/null"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
      if test ! -f "$cache_file" || test -h "$cache_file"; then
	cat confcache >"$cache_file"
      else
        case $cache_file in #(
        */* | ?:*)
	  mv -f confcache "$cache_file"$$ &&
	  mv -f "$cache_file"$$ "$cache_file" ;; #(
        *)
	  mv -f confcache "$cache_file" ;;
	esac
      fi
    fi
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

DEFS=-DHAVE_CONFIG_H

ac_libobjs=
ac_ltlibobjs=
U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
  #    will be set to the directory where LIBOBJS objects are built.
  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs


as_fn_append BUILD_DIR " modules"

phplibdir="$(pwd)/modules"

  PHP_VAR_SUBST="$PHP_VAR_SUBST phplibdir"


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating build directories" >&5
printf "%s\n" "$as_me: creating build directories" >&6;}
  $php_shtool mkdir -p $BUILD_DIR


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating Makefile" >&5
printf "%s\n" "$as_me: creating Makefile" >&6;}
  cat >Makefile <<EOF
srcdir = $abs_srcdir
builddir = $abs_builddir
top_srcdir = $abs_srcdir
top_builddir = $abs_builddir
EOF
  for i in $PHP_VAR_SUBST; do
    eval echo "$i = \$$i" >> Makefile
  done

  cat $abs_srcdir/build/Makefile.global Makefile.fragments Makefile.objects >> Makefile



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: patching main/php_config.h.in" >&5
printf "%s\n" "$as_me: patching main/php_config.h.in" >&6;}

  $SED -e 's/^#undef PACKAGE_[^ ]*/\/\* & \*\//g' < $srcdir/main/php_config.h.in \
    > $srcdir/main/php_config.h.in.tmp && mv $srcdir/main/php_config.h.in.tmp $srcdir/main/php_config.h.in


: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
ac_cs_recheck=false
ac_cs_silent=false

SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else case e in #(
  e) case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac ;;
esac
fi



# Reset variables that may have inherited troublesome values from
# the environment.

# IFS needs to be set, to space, tab, and newline, in precisely that order.
# (If _AS_PATH_WALK were called with IFS unset, it would have the
# side effect of setting IFS to empty, thus disabling word splitting.)
# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
IFS=" ""	$as_nl"

PS1='$ '
PS2='> '
PS4='+ '

# Ensure predictable behavior from utilities with locale-dependent output.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# We cannot yet rely on "unset" to work, but we need these variables
# to be unset--not just set to an empty or harmless value--now, to
# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
# also avoids known problems related to "unset" and subshell syntax
# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
do eval test \${$as_var+y} \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done

# Ensure that fds 0, 1, and 2 are open.
if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi

# The user is always right.
if ${PATH_SEPARATOR+false} :; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# Find who we are.  Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
  done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as 'sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi



# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  printf "%s\n" "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error


# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset

# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else case e in #(
  e) as_fn_append ()
  {
    eval $1=\$$1\$2
  } ;;
esac
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else case e in #(
  e) as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  } ;;
esac
fi # as_fn_arith


if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits


# Determine whether it's possible to make 'echo' print without a newline.
# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

# For backward compatibility with old third-party macros, we provide
# the shell variables $as_echo and $as_echo_n.  New code should use
# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
as_echo='printf %s\n'
as_echo_n='printf %s'

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
    # In both cases, we have to default to 'cp -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null


# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi


# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p

# Sed expression to map a string onto a valid CPP name.
as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated

# Sed expression to map a string onto a valid variable name.
as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
as_tr_sh="eval sed '$as_sed_sh'" # deprecated


exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by PHP $as_me 8.5.7, which was
generated by GNU Autoconf 2.72.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

_ACEOF

case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac

case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac


cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
config_commands="$ac_config_commands"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
'$as_me' instantiates files and other configuration actions
from templates according to the current configuration.  Unless the files
and actions are specified as TAGs, all are instantiated by default.

Usage: $0 [OPTION]... [TAG]...

  -h, --help       print this help, then exit
  -V, --version    print version number and configuration settings, then exit
      --config     print configuration, then exit
  -q, --quiet, --silent
                   do not print progress messages
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
      --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE
      --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE

Configuration files:
$config_files

Configuration headers:
$config_headers

Configuration commands:
$config_commands

Report bugs to <https://github.com/php/php-src/issues>.
PHP home page: <https://www.php.net>."

_ACEOF
ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
PHP config.status 8.5.7
configured by $0, generated by GNU Autoconf 2.72,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2023 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

ac_pwd='$ac_pwd'
srcdir='$srcdir'
test -n "\$AWK" || AWK=awk
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=?*)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  --*=)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=
    ac_shift=:
    ;;
  *)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    printf "%s\n" "$ac_cs_version"; exit ;;
  --config | --confi | --conf | --con | --co | --c )
    printf "%s\n" "$ac_cs_config"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    '') as_fn_error $? "missing file argument" ;;
    esac
    as_fn_append CONFIG_FILES " '$ac_optarg'"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
    ac_need_defaults=false;;
  --he | --h)
    # Conflict between --help and --header
    as_fn_error $? "ambiguous option: '$1'
Try '$0 --help' for more information.";;
  --help | --hel | -h )
    printf "%s\n" "$ac_cs_usage"; exit ;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) as_fn_error $? "unrecognized option: '$1'
Try '$0 --help' for more information." ;;

  *) as_fn_append ac_config_targets " $1"
     ac_need_defaults=false ;;

  esac
  shift
done

ac_configure_extra_args=

if $ac_cs_silent; then
  exec 6>/dev/null
  ac_configure_extra_args="$ac_configure_extra_args --silent"
fi

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  shift
  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
  CONFIG_SHELL='$SHELL'
  export CONFIG_SHELL
  exec "\$@"
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  printf "%s\n" "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
APACHE_THREADED_MPM="$APACHE_THREADED_MPM"; enable_zts="$enable_zts"

  AWK="$AWK" $SHELL $srcdir/build/genif.sh \
    $srcdir/main/internal_functions.c.in \
    "$EXT_STATIC" > main/internal_functions.c


  AWK="$AWK" $SHELL $srcdir/build/genif.sh \
    $srcdir/main/internal_functions.c.in \
    "$EXT_CLI_STATIC" > main/internal_functions_cli.c


_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1

# Handling of arguments.
for ac_config_target in $ac_config_targets
do
  case $ac_config_target in
    "main/php_config.h") CONFIG_HEADERS="$CONFIG_HEADERS main/php_config.h" ;;
    "apache2handler") CONFIG_COMMANDS="$CONFIG_COMMANDS apache2handler" ;;
    "sapi/cli/php.1") CONFIG_FILES="$CONFIG_FILES sapi/cli/php.1" ;;
    "sapi/fpm/init.d.php-fpm") CONFIG_FILES="$CONFIG_FILES sapi/fpm/init.d.php-fpm" ;;
    "sapi/fpm/php-fpm.8") CONFIG_FILES="$CONFIG_FILES sapi/fpm/php-fpm.8" ;;
    "sapi/fpm/php-fpm.conf") CONFIG_FILES="$CONFIG_FILES sapi/fpm/php-fpm.conf" ;;
    "sapi/fpm/php-fpm.service") CONFIG_FILES="$CONFIG_FILES sapi/fpm/php-fpm.service" ;;
    "sapi/fpm/status.html") CONFIG_FILES="$CONFIG_FILES sapi/fpm/status.html" ;;
    "sapi/fpm/www.conf") CONFIG_FILES="$CONFIG_FILES sapi/fpm/www.conf" ;;
    "sapi/phpdbg/phpdbg.1") CONFIG_FILES="$CONFIG_FILES sapi/phpdbg/phpdbg.1" ;;
    "sapi/cgi/php-cgi.1") CONFIG_FILES="$CONFIG_FILES sapi/cgi/php-cgi.1" ;;
    "$ext_dir/phar.1") CONFIG_FILES="$CONFIG_FILES $ext_dir/phar.1" ;;
    "$ext_dir/phar.phar.1") CONFIG_FILES="$CONFIG_FILES $ext_dir/phar.phar.1" ;;
    "main/build-defs.h") CONFIG_FILES="$CONFIG_FILES main/build-defs.h" ;;
    "scripts/man1/php-config.1") CONFIG_FILES="$CONFIG_FILES scripts/man1/php-config.1" ;;
    "scripts/man1/phpize.1") CONFIG_FILES="$CONFIG_FILES scripts/man1/phpize.1" ;;
    "scripts/php-config") CONFIG_FILES="$CONFIG_FILES scripts/php-config" ;;
    "scripts/phpize") CONFIG_FILES="$CONFIG_FILES scripts/phpize" ;;
    "Zend/zend_config.h") CONFIG_COMMANDS="$CONFIG_COMMANDS Zend/zend_config.h" ;;
    "main/internal_functions.c") CONFIG_COMMANDS="$CONFIG_COMMANDS main/internal_functions.c" ;;
    "main/internal_functions_cli.c") CONFIG_COMMANDS="$CONFIG_COMMANDS main/internal_functions_cli.c" ;;
    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;

  *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
  esac
done


# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi

# Have a temporary directory for convenience.  Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to '$tmp'.
$debug ||
{
  tmp= ac_tmp=
  trap 'exit_status=$?
  : "${ac_tmp:=$tmp}"
  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
  trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
ac_tmp=$tmp

# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with './config.status config.h'.
if test -n "$CONFIG_FILES"; then


ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
  eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  ac_cs_awk_cr='\\r'
else
  ac_cs_awk_cr=$ac_cr
fi

echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF


{
  echo "cat >conf$$subs.awk <<_ACEOF" &&
  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  echo "_ACEOF"
} >conf$$subs.sh ||
  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  . ./conf$$subs.sh ||
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5

  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  if test $ac_delim_n = $ac_delim_num; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done
rm -f conf$$subs.sh

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' <conf$$subs.awk | sed '
/^[^""]/{
  N
  s/\n//
}
' >>$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
  for (key in S) S_is_set[key] = 1
  FS = ""

}
{
  line = $ 0
  nfields = split(line, field, "@")
  substed = 0
  len = length(field[1])
  for (i = 2; i < nfields; i++) {
    key = field[i]
    keylen = length(key)
    if (S_is_set[key]) {
      value = S[key]
      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
      len += length(value) + length(field[++i])
      substed = 1
    } else
      len += 1 + keylen
  }

  print line
}

_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
  cat
fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF

# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
h
s///
s/^/:/
s/[	 ]*$/:/
s/:\$(srcdir):/:/g
s/:\${srcdir}:/:/g
s/:@srcdir@:/:/g
s/^:*//
s/:*$//
x
s/\(=[	 ]*\).*/\1/
G
s/\n//
s/^[^=]*=[	 ]*$//
}'
fi

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"

# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with './config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF

# Transform confdefs.h into an awk script 'defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.

# Create a delimiter string that does not exist in confdefs.h, to ease
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
  if test -z "$ac_tt"; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

# For the awk script, D is an array of macro values keyed by name,
# likewise P contains macro parameters if any.  Preserve backslash
# newline sequences.

ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
sed -n '
s/.\{148\}/&'"$ac_delim"'/g
t rset
:rset
s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
t def
d
:def
s/\\$//
t bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3"/p
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
d
:bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3\\\\\\n"\\/p
t cont
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
t cont
d
:cont
n
s/.\{148\}/&'"$ac_delim"'/g
t clear
:clear
s/\\$//
t bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/"/p
d
:bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
b cont
' <confdefs.h | sed '
s/'"$ac_delim"'/"\\\
"/g' >>$CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  for (key in D) D_is_set[key] = 1
  FS = ""
}
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
  line = \$ 0
  split(line, arg, " ")
  if (arg[1] == "#") {
    defundef = arg[2]
    mac1 = arg[3]
  } else {
    defundef = substr(arg[1], 2)
    mac1 = arg[2]
  }
  split(mac1, mac2, "(") #)
  macro = mac2[1]
  prefix = substr(line, 1, index(line, defundef) - 1)
  if (D_is_set[macro]) {
    # Preserve the white space surrounding the "#".
    print prefix "define", macro P[macro] D[macro]
    next
  } else {
    # Replace #undef with comments.  This is necessary, for example,
    # in the case of _POSIX_SOURCE, which is predefined and required
    # on some systems where configure will not decide to define it.
    if (defundef == "undef") {
      print "/*", prefix defundef, macro, "*/"
      next
    }
  }
}
{ print }
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"


eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
shift
for ac_tag
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
  :[FH]-) ac_tag=-:-;;
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  esac
  ac_save_IFS=$IFS
  IFS=:
  set x $ac_tag
  IFS=$ac_save_IFS
  shift
  ac_file=$1
  shift

  case $ac_mode in
  :L) ac_source=$1;;
  :[FH])
    ac_file_inputs=
    for ac_f
    do
      case $ac_f in
      -) ac_f="$ac_tmp/stdin";;
      *) # Look for the file first in the build tree, then in the source tree
	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
	 # because $ac_f cannot contain ':'.
	 test -f "$ac_f" ||
	   case $ac_f in
	   [\\/$]*) false;;
	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
	   esac ||
	   as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
      esac
      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
      as_fn_append ac_file_inputs " '$ac_f'"
    done

    # Let's still pretend it is 'configure' which instantiates (i.e., don't
    # use $as_me), people would be surprised to read:
    #    /* config.h.  Generated by config.status.  */
    configure_input='Generated from '`
	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
	`' by configure.'
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
printf "%s\n" "$as_me: creating $ac_file" >&6;}
    fi
    # Neutralize special characters interpreted by sed in replacement strings.
    case $configure_input in #(
    *\&* | *\|* | *\\* )
       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
       sed 's/[\\\\&|]/\\\\&/g'`;; #(
    *) ac_sed_conf_input=$configure_input;;
    esac

    case $ac_tag in
    *:-:* | *:-) cat >"$ac_tmp/stdin" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
    esac
    ;;
  esac

  ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file" : 'X\(//\)[^/]' \| \
	 X"$ac_file" : 'X\(//\)$' \| \
	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  as_dir="$ac_dir"; as_fn_mkdir_p
  ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


  case $ac_mode in
  :F)
  #
  # CONFIG_FILE
  #

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
ac_sed_dataroot='
/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  ac_datarootdir_hack='
  s&@datadir@&$datadir&g
  s&@docdir@&$docdir&g
  s&@infodir@&$infodir&g
  s&@localedir@&$localedir&g
  s&@mandir@&$mandir&g
  s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF

# Neutralize VPATH when '$srcdir' = '.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
      "$ac_tmp/out"`; test -z "$ac_out"; } &&
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
which seems to be undefined.  Please make sure it is defined" >&5
printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
which seems to be undefined.  Please make sure it is defined" >&2;}

  rm -f "$ac_tmp/stdin"
  case $ac_file in
  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
  esac \
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 ;;
  :H)
  #
  # CONFIG_HEADER
  #
  if test x"$ac_file" != x-; then
    {
      printf "%s\n" "/* $configure_input  */" >&1 \
      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
    } >"$ac_tmp/config.h" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
    else
      rm -f "$ac_file"
      mv "$ac_tmp/config.h" "$ac_file" \
	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
    fi
  else
    printf "%s\n" "/* $configure_input  */" >&1 \
      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
      || as_fn_error $? "could not create -" "$LINENO" 5
  fi
 ;;

  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
 ;;
  esac


  case $ac_file$ac_mode in
    "apache2handler":C) if test "x$enable_zts" = xyes
then :

else case e in #(
  e) if test "x$APACHE_THREADED_MPM" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
+--------------------------------------------------------------------+
|                        *** WARNING ***                             |
|                                                                    |
| You have built PHP for Apache's current non-threaded MPM.          |
| If you change Apache to use a threaded MPM you must reconfigure    |
| PHP with --enable-zts                                              |
+--------------------------------------------------------------------+
  " >&5
printf "%s\n" "$as_me: WARNING:
+--------------------------------------------------------------------+
|                        *** WARNING ***                             |
|                                                                    |
| You have built PHP for Apache's current non-threaded MPM.          |
| If you change Apache to use a threaded MPM you must reconfigure    |
| PHP with --enable-zts                                              |
+--------------------------------------------------------------------+
  " >&2;}
fi ;;
esac
fi ;;
    "Zend/zend_config.h":C)
cat >Zend/zend_config.h <<FEO
#include <../main/php_config.h>
FEO
 ;;
    "default":C)
cat <<X

+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE. By continuing this installation  |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

X
 ;;

  esac
done # for ac_tag


as_fn_exit 0
_ACEOF
ac_clean_files=$ac_clean_files_save

test $ac_write_fail = 0 ||
  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5


# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  ac_config_status_args=
  test "$silent" = yes &&
    ac_config_status_args="$ac_config_status_args --quiet"
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi


