From dfcbae060aec4c855ff275fe79743658be873dac Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Fri, 22 Sep 2023 12:46:20 +0900 Subject: [PATCH] Use AC_CHECK_TYPE --- configure | 8 ++------ configure.ac | 2 +- pyconfig.h.in | 3 --- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 6ff2304bb0ee80..b887e1648abefe 100755 --- a/configure +++ b/configure @@ -23775,14 +23775,10 @@ fi case $ac_sys_system/$ac_sys_release in #( Darwin/*) : - ac_fn_c_check_type "$LINENO" "Function" "ac_cv_type_Function" "$ac_includes_default" + ac_fn_c_check_type "$LINENO" "Function" "ac_cv_type_Function" "#include +" if test "x$ac_cv_type_Function" = xyes then : - -printf "%s\n" "#define HAVE_FUNCTION 1" >>confdefs.h - -readline/readline.h -else $as_nop printf "%s\n" "#define WITH_APPLE_EDITLINE 1" >>confdefs.h fi diff --git a/configure.ac b/configure.ac index 7ed6e61009953c..8b00383fd6649f 100644 --- a/configure.ac +++ b/configure.ac @@ -5833,7 +5833,7 @@ AC_ARG_WITH( dnl gh-105323: Need to handle the macOS editline as an alias of readline. AS_CASE([$ac_sys_system/$ac_sys_release], - [Darwin/*], [AC_CHECK_TYPES(Function, readline/readline.h, AC_DEFINE([WITH_APPLE_EDITLINE]))], + [Darwin/*], [AC_CHECK_TYPE(Function, [AC_DEFINE([WITH_APPLE_EDITLINE])], [], [#include ])], [] ) diff --git a/pyconfig.h.in b/pyconfig.h.in index ff0db8c7cb57fe..c2c75c96dcaad1 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -419,9 +419,6 @@ /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE -/* Define to 1 if the system has the type `Function'. */ -#undef HAVE_FUNCTION - /* Define to 1 if you have the `futimens' function. */ #undef HAVE_FUTIMENS