1999-04-17 08:37:12 +08:00
|
|
|
dnl $Id$ -*- sh -*-
|
|
|
|
|
1999-12-30 10:59:53 +08:00
|
|
|
divert(2)dnl
|
1999-04-22 10:48:28 +08:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for crypt() capabilities
|
|
|
|
dnl
|
|
|
|
AC_DEFUN(AC_CRYPT_CAP,[
|
|
|
|
|
1999-12-27 06:35:55 +08:00
|
|
|
AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
|
1999-04-22 10:48:28 +08:00
|
|
|
AC_TRY_RUN([
|
|
|
|
main() {
|
|
|
|
#if HAVE_CRYPT
|
|
|
|
exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
|
|
|
|
#else
|
|
|
|
exit(0);
|
|
|
|
#endif
|
|
|
|
}],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_des=yes
|
1999-04-22 10:48:28 +08:00
|
|
|
],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_des=no
|
1999-04-22 10:48:28 +08:00
|
|
|
],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_des=yes
|
1999-04-22 10:48:28 +08:00
|
|
|
])
|
1999-12-27 06:35:55 +08:00
|
|
|
])
|
|
|
|
if test "$ac_cv_crypt_des" = "yes"; then
|
2000-02-26 11:20:55 +08:00
|
|
|
ac_result=1
|
1999-12-27 06:35:55 +08:00
|
|
|
else
|
2000-02-26 11:20:55 +08:00
|
|
|
ac_result=0
|
1999-12-27 06:35:55 +08:00
|
|
|
fi
|
2000-02-26 11:20:55 +08:00
|
|
|
AC_DEFINE_UNQUOTED(PHP_STD_DES_CRYPT, $ac_result, [Whether the system supports standard DES salt])
|
1999-04-22 10:48:28 +08:00
|
|
|
|
1999-12-27 06:35:55 +08:00
|
|
|
AC_CACHE_CHECK(for extended DES crypt, ac_cv_crypt_ext_des,[
|
1999-04-22 10:48:28 +08:00
|
|
|
AC_TRY_RUN([
|
|
|
|
main() {
|
|
|
|
#if HAVE_CRYPT
|
|
|
|
exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
|
|
|
|
#else
|
|
|
|
exit(0);
|
|
|
|
#endif
|
|
|
|
}],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_ext_des=yes
|
1999-04-22 10:48:28 +08:00
|
|
|
],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_ext_des=no
|
1999-04-22 10:48:28 +08:00
|
|
|
],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_ext_des=no
|
|
|
|
])
|
1999-04-22 10:48:28 +08:00
|
|
|
])
|
1999-12-27 06:35:55 +08:00
|
|
|
if test "$ac_cv_crypt_ext_des" = "yes"; then
|
2000-02-26 11:20:55 +08:00
|
|
|
ac_result=1
|
1999-12-27 06:35:55 +08:00
|
|
|
else
|
2000-02-26 11:20:55 +08:00
|
|
|
ac_result=0
|
1999-12-27 06:35:55 +08:00
|
|
|
fi
|
2000-02-26 11:20:55 +08:00
|
|
|
AC_DEFINE_UNQUOTED(PHP_EXT_DES_CRYPT, $ac_result, [Whether the system supports extended DES salt])
|
1999-04-22 10:48:28 +08:00
|
|
|
|
1999-12-27 06:35:55 +08:00
|
|
|
AC_CACHE_CHECK(for MD5 crypt, ac_cv_crypt_md5,[
|
1999-04-22 10:48:28 +08:00
|
|
|
AC_TRY_RUN([
|
|
|
|
main() {
|
|
|
|
#if HAVE_CRYPT
|
|
|
|
char salt[15], answer[40];
|
|
|
|
|
|
|
|
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");
|
|
|
|
exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
|
|
|
|
#else
|
|
|
|
exit(0);
|
|
|
|
#endif
|
|
|
|
}],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_md5=yes
|
1999-04-22 10:48:28 +08:00
|
|
|
],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_md5=no
|
1999-04-22 10:48:28 +08:00
|
|
|
],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_md5=no
|
1999-04-22 10:48:28 +08:00
|
|
|
])
|
1999-12-27 06:35:55 +08:00
|
|
|
])
|
|
|
|
if test "$ac_cv_crypt_md5" = "yes"; then
|
2000-02-26 11:20:55 +08:00
|
|
|
ac_result=1
|
1999-12-27 06:35:55 +08:00
|
|
|
else
|
2000-02-26 11:20:55 +08:00
|
|
|
ac_result=0
|
1999-12-27 06:35:55 +08:00
|
|
|
fi
|
2000-02-26 11:20:55 +08:00
|
|
|
AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, $ac_result, [Whether the system supports MD5 salt])
|
1999-04-22 10:48:28 +08:00
|
|
|
|
1999-12-27 06:35:55 +08:00
|
|
|
AC_CACHE_CHECK(for Blowfish crypt, ac_cv_crypt_blowfish,[
|
1999-04-22 10:48:28 +08:00
|
|
|
AC_TRY_RUN([
|
|
|
|
main() {
|
|
|
|
#if HAVE_CRYPT
|
|
|
|
char salt[25], answer[70];
|
|
|
|
|
|
|
|
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[16],"O............gl95GkTKn53Of.H4YchXl5PwvvW.5ri");
|
|
|
|
exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
|
|
|
|
#else
|
|
|
|
exit(0);
|
|
|
|
#endif
|
|
|
|
}],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_blowfish=yes
|
1999-04-22 10:48:28 +08:00
|
|
|
],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_blowfish=no
|
1999-04-22 10:48:28 +08:00
|
|
|
],[
|
1999-12-27 06:35:55 +08:00
|
|
|
ac_cv_crypt_blowfish=no
|
|
|
|
])
|
1999-04-22 10:48:28 +08:00
|
|
|
])
|
1999-12-27 06:35:55 +08:00
|
|
|
if test "$ac_cv_crypt_blowfish" = "yes"; then
|
2000-02-26 11:20:55 +08:00
|
|
|
ac_result=1
|
1999-12-27 06:35:55 +08:00
|
|
|
else
|
2000-02-26 11:20:55 +08:00
|
|
|
ac_result=0
|
1999-12-27 06:35:55 +08:00
|
|
|
fi
|
2000-02-26 11:20:55 +08:00
|
|
|
AC_DEFINE_UNQUOTED(PHP_BLOWFISH_CRYPT, $ac_result, [Whether the system supports BlowFish salt])
|
1999-04-22 10:48:28 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_LIB(c, dlopen, [
|
|
|
|
# fake it
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_LIBDL,1,[ ]) ], [
|
1999-04-22 10:48:28 +08:00
|
|
|
AC_CHECK_LIB(dl, dlopen, [
|
|
|
|
LIBS="-ldl $LIBS"
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_LIBDL,1,[ ]) ], []) ])
|
1999-04-22 10:48:28 +08:00
|
|
|
|
1999-04-23 12:54:31 +08:00
|
|
|
AC_CHECK_LIB(pam, pam_start, [
|
|
|
|
EXTRA_LIBS="$EXTRA_LIBS -lpam"
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_LIBPAM,1,[ ]) ], [])
|
1999-04-23 12:54:31 +08:00
|
|
|
|
1999-09-22 04:10:53 +08:00
|
|
|
AC_CHECK_LIB(crypt, crypt, [
|
|
|
|
AC_ADD_LIBRARY(crypt)
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_LIBCRYPT,1,[ ]) ], [])
|
1999-09-22 04:10:53 +08:00
|
|
|
|
1999-10-21 00:17:30 +08:00
|
|
|
AC_CHECK_FUNCS(getcwd)
|
|
|
|
AC_CHECK_FUNCS(getwd)
|
1999-04-25 05:52:53 +08:00
|
|
|
|
1999-12-30 10:59:53 +08:00
|
|
|
divert(4)dnl
|
1999-04-22 10:48:28 +08:00
|
|
|
|
1999-11-14 00:51:33 +08:00
|
|
|
AC_ARG_WITH(regex,
|
|
|
|
[ --with-regex=TYPE regex library type: system, apache, php],
|
1999-11-13 04:56:30 +08:00
|
|
|
[
|
1999-11-14 00:51:33 +08:00
|
|
|
REGEX_TYPE=$withval
|
1999-11-13 04:56:30 +08:00
|
|
|
],[
|
1999-11-14 00:51:33 +08:00
|
|
|
REGEX_TYPE=php
|
1999-11-13 04:56:30 +08:00
|
|
|
])
|
|
|
|
|
1999-11-14 00:51:33 +08:00
|
|
|
AC_ARG_WITH(system-regex,
|
|
|
|
[ --with-system-regex (deprecated) Use system regex library],
|
|
|
|
[
|
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
REGEX_TYPE=system
|
|
|
|
else
|
|
|
|
REGEX_TYPE=php
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
1999-09-21 23:00:22 +08:00
|
|
|
AC_CRYPT_CAP
|
|
|
|
|
1999-04-17 08:37:12 +08:00
|
|
|
PHP_EXTENSION(standard)
|
1999-04-22 10:48:28 +08:00
|
|
|
|