2018-07-03 00:52:16 +00:00
dnl -*- autoconf -*-
1999-04-17 00:37:12 +00:00
2001-03-11 10:08:27 +00:00
dnl
dnl Check if flush should be called explicitly after buffered io
dnl
2007-07-11 11:50:37 +00:00
AC_CACHE_CHECK([whether flush should be called explicitly after a buffered io], ac_cv_flush_io,[
2018-07-29 23:50:24 +00:00
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2001-03-11 10:08:27 +00:00
#include <stdio.h>
#include <stdlib.h>
2020-10-05 08:43:58 +00:00
#include <string.h>
#include <unistd.h>
2001-03-11 10:08:27 +00:00
int main(int argc, char **argv)
{
char *filename = tmpnam(NULL);
char buffer[64];
int result = 0;
2018-01-07 14:55:12 +00:00
2001-03-11 10:08:27 +00:00
FILE *fp = fopen(filename, "wb");
if (NULL == fp)
return 0;
fputs("line 1\n", fp);
fputs("line 2\n", fp);
fclose(fp);
2018-01-07 14:55:12 +00:00
2001-03-11 10:08:27 +00:00
fp = fopen(filename, "rb+");
if (NULL == fp)
return 0;
fgets(buffer, sizeof(buffer), fp);
fputs("line 3\n", fp);
rewind(fp);
fgets(buffer, sizeof(buffer), fp);
if (0 != strcmp(buffer, "line 1\n"))
result = 1;
fgets(buffer, sizeof(buffer), fp);
if (0 != strcmp(buffer, "line 3\n"))
result = 1;
fclose(fp);
unlink(filename);
exit(result);
}
2018-07-29 23:50:24 +00:00
]])],[
2001-05-12 11:09:05 +00:00
ac_cv_flush_io=no
2001-03-11 10:08:27 +00:00
],[
2001-05-12 11:09:05 +00:00
ac_cv_flush_io=yes
2001-03-11 10:08:27 +00:00
],[
2001-05-12 11:09:05 +00:00
ac_cv_flush_io=no
2001-03-11 10:08:27 +00:00
])])
2007-07-11 11:50:37 +00:00
if test "$ac_cv_flush_io" = "yes"; then
AC_DEFINE(HAVE_FLUSHIO, 1, [Define if flush should be called explicitly after a buffered io.])
fi
2001-03-11 10:08:27 +00:00
1999-04-22 02:48:28 +00:00
dnl
dnl Check for crypt() capabilities
dnl
2007-07-11 11:50:37 +00:00
if test "$ac_cv_func_crypt" = "no"; then
2003-02-14 01:27:15 +00:00
AC_CHECK_LIB(crypt, crypt, [
LIBS="-lcrypt $LIBS -lcrypt"
AC_DEFINE(HAVE_CRYPT, 1, [ ])
])
2007-07-11 11:50:37 +00:00
fi
2018-01-07 14:55:12 +00:00
2007-07-11 11:50:37 +00:00
AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
2018-07-29 23:50:24 +00:00
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2020-10-05 08:43:58 +00:00
#include <string.h>
2004-09-28 20:42:56 +00:00
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
2000-07-19 16:19:40 +00:00
#if HAVE_CRYPT_H
#include <crypt.h>
#endif
2016-03-03 16:28:34 +00:00
int main() {
1999-04-22 02:48:28 +00:00
#if HAVE_CRYPT
2016-03-03 16:28:34 +00:00
char *encrypted = crypt("rasmuslerdorf","rl");
2020-10-05 08:43:58 +00:00
return !encrypted || strcmp(encrypted,"rl.3StKT.4T8M");
1999-04-22 02:48:28 +00:00
#else
2020-10-05 08:43:58 +00:00
return 1;
1999-04-22 02:48:28 +00:00
#endif
2018-07-29 23:50:24 +00:00
}]])],[
2007-07-11 11:50:37 +00:00
ac_cv_crypt_des=yes
],[
ac_cv_crypt_des=no
],[
ac_cv_crypt_des=yes
])])
1999-04-22 02:48:28 +00:00
2007-07-11 11:50:37 +00:00
AC_CACHE_CHECK(for extended DES crypt, ac_cv_crypt_ext_des,[
2018-07-29 23:50:24 +00:00
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2020-10-05 08:43:58 +00:00
#include <string.h>
2004-09-28 20:42:56 +00:00
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
2000-07-19 16:19:40 +00:00
#if HAVE_CRYPT_H
#include <crypt.h>
#endif
2016-03-03 16:28:34 +00:00
int main() {
1999-04-22 02:48:28 +00:00
#if HAVE_CRYPT
2016-03-03 16:28:34 +00:00
char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
2020-10-05 08:43:58 +00:00
return !encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc");
1999-04-22 02:48:28 +00:00
#else
2020-10-05 08:43:58 +00:00
return 1;
1999-04-22 02:48:28 +00:00
#endif
2018-07-29 23:50:24 +00:00
}]])],[
2007-07-11 11:50:37 +00:00
ac_cv_crypt_ext_des=yes
],[
ac_cv_crypt_ext_des=no
],[
ac_cv_crypt_ext_des=no
])])
1999-04-22 02:48:28 +00:00
2007-07-11 11:50:37 +00:00
AC_CACHE_CHECK(for MD5 crypt, ac_cv_crypt_md5,[
2018-07-29 23:50:24 +00:00
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2020-10-05 08:43:58 +00:00
#include <string.h>
2004-09-28 20:42:56 +00:00
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
2000-07-19 16:19:40 +00:00
#if HAVE_CRYPT_H
#include <crypt.h>
#endif
2016-03-03 16:28:34 +00:00
int main() {
1999-04-22 02:48:28 +00:00
#if HAVE_CRYPT
2016-03-03 16:28:34 +00:00
char salt[15], answer[40];
char *encrypted;
1999-04-22 02:48:28 +00:00
2018-01-07 14:55:12 +00:00
salt[0]='$'; salt[1]='1'; salt[2]='$';
2016-03-03 16:28:34 +00:00
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);
2020-10-05 08:43:58 +00:00
return !encrypted || strcmp(encrypted,answer);
1999-04-22 02:48:28 +00:00
#else
2020-10-05 08:43:58 +00:00
return 1;
1999-04-22 02:48:28 +00:00
#endif
2018-07-29 23:50:24 +00:00
}]])],[
2007-07-11 11:50:37 +00:00
ac_cv_crypt_md5=yes
],[
ac_cv_crypt_md5=no
],[
ac_cv_crypt_md5=no
])])
1999-04-22 02:48:28 +00:00
2007-07-11 11:50:37 +00:00
AC_CACHE_CHECK(for Blowfish crypt, ac_cv_crypt_blowfish,[
2018-07-29 23:50:24 +00:00
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2020-10-05 08:43:58 +00:00
#include <string.h>
2004-09-28 20:42:56 +00:00
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
2000-07-19 16:19:40 +00:00
#if HAVE_CRYPT_H
#include <crypt.h>
#endif
2016-03-03 16:28:34 +00:00
int main() {
1999-04-22 02:48:28 +00:00
#if HAVE_CRYPT
2016-03-03 16:28:34 +00:00
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);
2020-10-05 08:43:58 +00:00
return !encrypted || strcmp(encrypted,answer);
1999-04-22 02:48:28 +00:00
#else
2020-10-05 08:43:58 +00:00
return 1;
1999-04-22 02:48:28 +00:00
#endif
2018-07-29 23:50:24 +00:00
}]])],[
2007-07-11 11:50:37 +00:00
ac_cv_crypt_blowfish=yes
],[
ac_cv_crypt_blowfish=no
],[
ac_cv_crypt_blowfish=no
])])
2008-07-28 11:50:35 +00:00
2015-02-17 02:23:47 +00:00
AC_CACHE_CHECK(for SHA512 crypt, ac_cv_crypt_sha512,[
2018-07-29 23:50:24 +00:00
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2020-10-05 08:43:58 +00:00
#include <string.h>
2009-12-09 00:20:14 +00:00
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_CRYPT_H
#include <crypt.h>
#endif
2016-03-03 16:28:34 +00:00
int main() {
2009-12-09 00:20:14 +00:00
#if HAVE_CRYPT
2016-03-03 16:28:34 +00:00
char salt[21], answer[21+86];
char *encrypted;
2013-09-13 10:54:42 +00:00
2016-03-03 16:28:34 +00:00
strcpy(salt,"\$6\$rasmuslerdorf\$");
strcpy(answer, salt);
strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/");
encrypted = crypt("rasmuslerdorf",salt);
2020-10-05 08:43:58 +00:00
return !encrypted || strcmp(encrypted,answer);
2009-12-09 00:20:14 +00:00
#else
2020-10-05 08:43:58 +00:00
return 1;
2009-12-09 00:20:14 +00:00
#endif
2018-07-29 23:50:24 +00:00
}]])],[
2015-02-17 02:23:47 +00:00
ac_cv_crypt_sha512=yes
2009-12-09 00:20:14 +00:00
],[
2015-02-17 02:23:47 +00:00
ac_cv_crypt_sha512=no
2009-12-09 00:20:14 +00:00
],[
2015-02-17 02:23:47 +00:00
ac_cv_crypt_sha512=no
2009-12-09 00:20:14 +00:00
])])
2015-02-17 02:23:47 +00:00
AC_CACHE_CHECK(for SHA256 crypt, ac_cv_crypt_sha256,[
2018-07-29 23:50:24 +00:00
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2020-10-05 08:43:58 +00:00
#include <string.h>
2009-12-09 00:20:14 +00:00
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_CRYPT_H
#include <crypt.h>
#endif
2016-03-03 16:28:34 +00:00
int main() {
2009-12-09 00:20:14 +00:00
#if HAVE_CRYPT
2016-03-03 16:28:34 +00:00
char salt[21], answer[21+43];
char *encrypted;
2013-09-13 10:54:42 +00:00
2016-03-03 16:28:34 +00:00
strcpy(salt,"\$5\$rasmuslerdorf\$");
strcpy(answer, salt);
strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23");
encrypted = crypt("rasmuslerdorf",salt);
2020-10-05 08:43:58 +00:00
return !encrypted || strcmp(encrypted,answer);
2009-12-09 00:20:14 +00:00
#else
2020-10-05 08:43:58 +00:00
return 1;
2009-12-09 00:20:14 +00:00
#endif
2018-07-29 23:50:24 +00:00
}]])],[
2015-02-17 02:23:47 +00:00
ac_cv_crypt_sha256=yes
2009-12-09 00:20:14 +00:00
],[
2015-02-17 02:23:47 +00:00
ac_cv_crypt_sha256=no
2009-12-09 00:20:14 +00:00
],[
2015-02-17 02:23:47 +00:00
ac_cv_crypt_sha256=no
2009-12-09 00:20:14 +00:00
])])
2008-07-28 11:50:35 +00:00
dnl
dnl If one of them is missing, use our own implementation, portable code is then possible
dnl
2016-03-25 19:37:17 +00:00
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" || test "x$php_crypt_r" = "x0"; then
2010-02-09 21:58:13 +00:00
dnl
dnl Check for __alignof__ support in the compiler
dnl
2010-02-10 13:37:17 +00:00
AC_CACHE_CHECK(whether the compiler supports __alignof__, ac_cv_alignof_exists,[
2018-07-29 23:50:24 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
]],[[
2010-02-10 13:37:17 +00:00
int align = __alignof__(int);
2018-07-29 23:50:24 +00:00
]])],[
2010-02-09 21:58:13 +00:00
ac_cv_alignof_exists=yes
],[
ac_cv_alignof_exists=no
])])
if test "$ac_cv_alignof_exists" = "yes"; then
AC_DEFINE([HAVE_ALIGNOF], 1, [whether the compiler supports __alignof__])
fi
2008-07-28 11:50:35 +00:00
AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 1, [Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5])
2009-12-09 00:20:14 +00:00
PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
2007-07-11 11:50:37 +00:00
else
2008-07-28 11:50:35 +00:00
AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish, des and ext des])
2007-07-11 11:50:37 +00:00
fi
1999-09-21 20:10:53 +00:00
2018-01-07 14:55:12 +00:00
dnl
2016-03-25 19:50:52 +00:00
dnl Check for __attribute__ ((__aligned__)) support in the compiler
dnl
AC_CACHE_CHECK(whether the compiler supports aligned attribute, ac_cv_attribute_aligned,[
2018-07-29 23:50:24 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
]],[[
2016-03-25 19:50:52 +00:00
unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int))));
2018-07-29 23:50:24 +00:00
]])],[
2016-03-25 19:50:52 +00:00
ac_cv_attribute_aligned=yes
],[
ac_cv_attribute_aligned=no
])])
if test "$ac_cv_attribute_aligned" = "yes"; then
AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, [whether the compiler supports __attribute__ ((__aligned__))])
fi
2007-07-11 11:50:37 +00:00
dnl
dnl Check for available functions
dnl
2014-08-29 08:54:28 +00:00
dnl log2 could be used to improve the log function, however it requires C99. The check for log2 should be turned on,
dnl as soon as we support C99.
2017-02-02 17:52:27 +00:00
AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass mempcpy strpncpy)
2018-01-07 14:55:12 +00:00
AC_FUNC_FNMATCH
1999-04-24 21:52:53 +00:00
2007-07-11 11:50:37 +00:00
dnl
dnl Check if there is a support means of creating a new process
dnl and defining which handles it receives
dnl
AC_CHECK_FUNCS(fork CreateProcess, [
2009-11-27 23:41:13 +00:00
php_can_support_proc_open=yes
2007-07-11 11:50:37 +00:00
break
],[
2009-11-27 23:41:13 +00:00
php_can_support_proc_open=no
])
2007-07-11 11:50:37 +00:00
AC_MSG_CHECKING([if your OS can spawn processes with inherited handles])
2009-11-27 23:41:13 +00:00
if test "$php_can_support_proc_open" = "yes"; then
2007-07-11 11:50:37 +00:00
AC_MSG_RESULT(yes)
AC_DEFINE(PHP_CAN_SUPPORT_PROC_OPEN,1, [Define if your system has fork/vfork/CreateProcess])
else
AC_MSG_RESULT(no)
fi
2003-01-15 16:29:00 +00:00
2013-07-10 22:48:12 +00:00
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
2018-05-23 20:23:13 +00:00
cgi|cli|phpdbg)
2013-07-10 22:48:12 +00:00
PHP_ENABLE_CHROOT_FUNC=yes
;;
*)
PHP_ENABLE_CHROOT_FUNC=no
break
;;
esac
done
;;
esac
if test "$PHP_ENABLE_CHROOT_FUNC" = "yes"; then
2001-09-12 02:07:46 +00:00
AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot() function])
fi
2002-11-19 02:34:13 +00:00
dnl
dnl Detect library functions needed by php dns_xxx functions
2009-08-11 22:07:35 +00:00
dnl ext/standard/php_dns.h will collect these in a single define: HAVE_FULL_DNS_FUNCS
2002-11-19 02:34:13 +00:00
dnl
2009-08-11 22:07:35 +00:00
PHP_CHECK_FUNC(res_nsearch, resolv, bind, socket)
2017-01-07 14:36:14 +00:00
PHP_CHECK_FUNC(res_ndestroy, resolv, bind, socket)
2009-08-11 22:07:35 +00:00
PHP_CHECK_FUNC(dns_search, resolv, bind, socket)
2002-11-19 02:34:13 +00:00
PHP_CHECK_FUNC(dn_expand, resolv, bind, socket)
2009-01-11 23:37:16 +00:00
PHP_CHECK_FUNC(dn_skipname, resolv, bind, socket)
dnl
2009-08-11 22:07:35 +00:00
dnl These are old deprecated functions
2009-01-11 23:37:16 +00:00
dnl
2009-08-11 22:07:35 +00:00
PHP_CHECK_FUNC(res_search, resolv, bind, socket)
2002-11-19 02:34:13 +00:00
2007-07-11 11:50:37 +00:00
dnl
dnl Check for strptime()
dnl
2006-08-24 11:06:02 +00:00
AC_CACHE_CHECK(whether strptime() declaration fails, ac_cv_strptime_decl_fails,[
2018-07-29 23:50:24 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2006-08-24 11:06:02 +00:00
#include <time.h>
2018-07-29 23:50:24 +00:00
]],[[
2006-08-24 11:06:02 +00:00
#ifndef HAVE_STRPTIME
#error no strptime() on this platform
#else
/* use invalid strptime() declaration to see if it fails to compile */
int strptime(const char *s, const char *format, struct tm *tm);
#endif
2018-07-29 23:50:24 +00:00
]])],[
2007-07-11 11:50:37 +00:00
ac_cv_strptime_decl_fails=no
],[
ac_cv_strptime_decl_fails=yes
])])
2006-08-24 11:06:02 +00:00
if test "$ac_cv_strptime_decl_fails" = "yes"; then
AC_DEFINE([HAVE_STRPTIME_DECL_FAILS], 1, [whether strptime() declaration fails])
fi
2007-07-11 11:50:37 +00:00
dnl
dnl Check for i18n capabilities
dnl
AC_CHECK_HEADERS([wchar.h])
2018-07-29 04:10:16 +00:00
AC_CHECK_FUNCS([mblen mbrlen mbsinit])
2007-07-11 11:50:37 +00:00
AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t],[
2018-07-29 23:50:24 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2007-07-11 11:50:37 +00:00
#ifdef HAVE_WCHAR_H
# include <wchar.h>
#endif
2018-07-29 23:50:24 +00:00
]],[[
2015-02-08 20:45:19 +00:00
mbstate_t a;
2018-07-29 23:50:24 +00:00
]])],[
2007-07-11 11:50:37 +00:00
ac_cv_type_mbstate_t=yes
],[
ac_cv_type_mbstate_t=no
])])
if test "$ac_cv_type_mbstate_t" = "yes"; then
AC_DEFINE([HAVE_MBSTATE_T], 1, [Define if your system has mbstate_t in wchar.h])
fi
2003-10-04 12:23:11 +00:00
2010-06-17 10:22:03 +00:00
dnl
dnl Check for atomic operation API availability in Solaris
dnl
AC_CHECK_HEADERS([atomic.h])
2015-10-30 19:08:20 +00:00
dnl
dnl Check for arc4random on BSD systems
dnl
AC_CHECK_DECLS([arc4random_buf])
2016-07-09 04:45:19 +00:00
dnl
dnl Check for argon2
dnl
2016-08-01 23:53:24 +00:00
PHP_ARG_WITH(password-argon2, for Argon2 support,
2018-02-14 20:47:56 +00:00
[ --with-password-argon2[=DIR]
2018-07-31 01:09:44 +00:00
Include Argon2 support in password_*. DIR is the Argon2 shared library path])
2016-07-11 21:31:31 +00:00
2016-08-02 00:03:34 +00:00
if test "$PHP_PASSWORD_ARGON2" != "no"; then
2016-07-11 21:31:31 +00:00
AC_MSG_CHECKING([for Argon2 library])
2016-08-02 00:03:34 +00:00
for i in $PHP_PASSWORD_ARGON2 /usr /usr/local ; do
2016-07-12 04:13:07 +00:00
if test -r $i/include/argon2.h; then
2016-07-11 21:31:31 +00:00
ARGON2_DIR=$i;
AC_MSG_RESULT(found in $i)
2016-07-12 04:13:07 +00:00
break
2016-07-11 21:31:31 +00:00
fi
done
if test -z "$ARGON2_DIR"; then
AC_MSG_RESULT([not found])
2016-07-12 04:13:07 +00:00
AC_MSG_ERROR([Please ensure the argon2 header and library are installed])
2016-07-11 21:31:31 +00:00
fi
2016-07-12 04:13:07 +00:00
2016-07-12 15:24:11 +00:00
PHP_ADD_LIBRARY_WITH_PATH(argon2, $ARGON2_DIR/$PHP_LIBDIR)
2016-07-11 21:31:31 +00:00
PHP_ADD_INCLUDE($ARGON2_DIR/include)
2017-06-18 23:17:43 +00:00
AC_CHECK_LIB(argon2, argon2id_hash_raw, [
LIBS="$LIBS -largon2"
2018-06-15 20:46:42 +00:00
AC_DEFINE(HAVE_ARGON2LIB, 1, [ Define to 1 if you have the <argon2.h> header file ])
2017-06-18 23:17:43 +00:00
], [
2018-06-15 20:46:42 +00:00
AC_MSG_ERROR([Problem with libargon2.(a|so). Please verify that Argon2 header and libaries >= 20161029 are installed])
2017-06-18 23:17:43 +00:00
])
2016-07-11 21:31:31 +00:00
fi
2016-07-09 04:45:19 +00:00
2017-11-21 15:04:37 +00:00
dnl
dnl net_get_interfaces
dnl
2017-12-30 09:44:53 +00:00
AC_CHECK_HEADERS([net/if.h],[], [],
[
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <net/if.h>
])
AC_CHECK_HEADERS([netdb.h])
2017-11-21 15:04:37 +00:00
AC_MSG_CHECKING([for usable getifaddrs])
2018-07-29 23:50:24 +00:00
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
2017-11-28 14:35:14 +00:00
#include <sys/types.h>
2017-11-21 15:04:37 +00:00
#include <ifaddrs.h>
2018-07-29 23:50:24 +00:00
]],[[
2017-11-21 15:04:37 +00:00
struct ifaddrs *interfaces;
if (!getifaddrs(&interfaces)) {
freeifaddrs(interfaces);
}
2018-07-29 23:50:24 +00:00
]])], [ac_have_getifaddrs=yes], [ac_have_getifaddrs=no])
2017-11-21 15:04:37 +00:00
if test "$ac_have_getifaddrs" = "yes" ; then
AC_DEFINE(HAVE_GETIFADDRS, 1, [whether getifaddrs is present and usable])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
2007-07-11 11:50:37 +00:00
dnl
dnl Setup extension sources
dnl
2002-10-21 23:41:38 +00:00
PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
2016-07-05 10:16:37 +00:00
microtime.c pack.c pageinfo.c quot_print.c rand.c mt_rand.c \
2007-10-05 15:00:09 +00:00
soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
2009-07-26 22:59:46 +00:00
var.c versioning.c assert.c strnatcmp.c levenshtein.c \
2002-10-21 23:41:38 +00:00
incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
2003-10-27 05:35:41 +00:00
var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
2015-02-13 02:53:55 +00:00
filters.c proc_open.c streamsfuncs.c http.c password.c \
2018-01-07 14:55:12 +00:00
random.c net.c hrtime.c,,,
2014-10-05 17:49:41 +00:00
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
2002-03-07 14:20:02 +00:00
PHP_ADD_MAKEFILE_FRAGMENT
2005-11-21 23:08:02 +00:00
PHP_INSTALL_HEADERS([ext/standard/])