diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index e5fe3c72b1b26e..a9cd76407fc4b1 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -475,6 +475,14 @@ Options for third-party dependencies C compiler and linker flags for ``libzlib``, used by :mod:`gzip` module, overriding ``pkg-config``. +.. option:: --disable-curses + + Do not build nor install the :mod:`curses` module regardless of whether the + ``libncurses`` library is present on the host system (built and installed by + default if ``libncurses`` is present). + + .. versionadded:: 3.15 + WebAssembly Options ------------------- diff --git a/Misc/NEWS.d/next/Build/2025-07-16-11-41-43.gh-issue-136687.ob_uIp.rst b/Misc/NEWS.d/next/Build/2025-07-16-11-41-43.gh-issue-136687.ob_uIp.rst new file mode 100644 index 00000000000000..d1417ba6543f9c --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-07-16-11-41-43.gh-issue-136687.ob_uIp.rst @@ -0,0 +1,2 @@ +Add :option:`--disable-curses` option to :file:`configure` to manually exclude +the :mod:`curses` module from the build. diff --git a/configure b/configure index 4292f33ce21dce..90ada4ecd1e3ff 100755 --- a/configure +++ b/configure @@ -1129,6 +1129,7 @@ enable_big_digits with_platlibdir with_wheel_pkg_dir with_readline +enable_curses with_computed_gotos with_tail_call_interp with_remote_debug @@ -1848,6 +1849,7 @@ Optional Features: --enable-big-digits[=15|30] use big digits (30 or 15 bits) for Python longs (default is 30)] + --disable-curses disable building curses module (default is no) --disable-test-modules don't build nor install test modules Optional Packages: @@ -28276,9 +28278,32 @@ printf "%s\n" "$ac_cv_strftime_c99_support" >&6; } have_curses=no have_panel=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-curses" >&5 +printf %s "checking for --disable-curses... " >&6; } +# Check whether --enable-curses was given. +if test ${enable_curses+y} +then : + enableval=$enable_curses; + if test "x$enable_curses" = xyes +then : + Py_CHECK_NCURSES=yes +else case e in #( + e) Py_CHECK_NCURSES=no ;; +esac +fi + +else case e in #( + e) Py_CHECK_NCURSES=yes ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $Py_CHECK_NCURSES" >&5 +printf "%s\n" "$Py_CHECK_NCURSES" >&6; } -# Check for ncursesw/panelw first. If that fails, try ncurses/panel. +if test "$Py_CHECK_NCURSES" == 'yes' ; then + + + # Check for ncursesw/panelw first. If that fails, try ncurses/panel. @@ -28353,7 +28378,7 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_NCURSESW 1" >>confdefs.h - have_curses=yes + have_curses=yes pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for panelw" >&5 @@ -28426,12 +28451,12 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_PANELW 1" >>confdefs.h - have_panel=yes + have_panel=yes fi fi -if test "x$have_curses" = xno + if test "x$have_curses" = xno then : @@ -28507,7 +28532,7 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_NCURSES 1" >>confdefs.h - have_curses=yes + have_curses=yes pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for panel" >&5 @@ -28580,22 +28605,22 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_PANEL 1" >>confdefs.h - have_panel=yes + have_panel=yes fi fi fi -save_CFLAGS=$CFLAGS + save_CFLAGS=$CFLAGS save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS save_LIBS=$LIBS - # Make sure we've got the header defines. - as_fn_append CPPFLAGS " $CURSES_CFLAGS $PANEL_CFLAGS" - ac_fn_c_check_header_compile "$LINENO" "ncursesw/curses.h" "ac_cv_header_ncursesw_curses_h" "$ac_includes_default" + # Make sure we've got the header defines. + as_fn_append CPPFLAGS " $CURSES_CFLAGS $PANEL_CFLAGS" + ac_fn_c_check_header_compile "$LINENO" "ncursesw/curses.h" "ac_cv_header_ncursesw_curses_h" "$ac_includes_default" if test "x$ac_cv_header_ncursesw_curses_h" = xyes then : printf "%s\n" "#define HAVE_NCURSESW_CURSES_H 1" >>confdefs.h @@ -28651,10 +28676,10 @@ then : fi - # Check that we're able to link with crucial curses/panel functions. This - # also serves as a fallback in case pkg-config failed. - as_fn_append LIBS " $CURSES_LIBS $PANEL_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 + # Check that we're able to link with crucial curses/panel functions. This + # also serves as a fallback in case pkg-config failed. + as_fn_append LIBS " $CURSES_LIBS $PANEL_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 printf %s "checking for library containing initscr... " >&6; } if test ${ac_cv_search_initscr+y} then : @@ -28721,14 +28746,14 @@ then : if test "x$have_curses" = xno then : have_curses=yes - CURSES_LIBS=${CURSES_LIBS-"$ac_cv_search_initscr"} + CURSES_LIBS=${CURSES_LIBS-"$ac_cv_search_initscr"} fi else case e in #( e) have_curses=no ;; esac fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing update_panels" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing update_panels" >&5 printf %s "checking for library containing update_panels... " >&6; } if test ${ac_cv_search_update_panels+y} then : @@ -28795,7 +28820,7 @@ then : if test "x$have_panel" = xno then : have_panel=yes - PANEL_LIBS=${PANEL_LIBS-"$ac_cv_search_update_panels"} + PANEL_LIBS=${PANEL_LIBS-"$ac_cv_search_update_panels"} fi else case e in #( e) have_panel=no ;; @@ -28805,37 +28830,37 @@ fi -if test "have_curses" != "no" + if test "have_curses" != "no" then : -CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g') + CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g') -if test "x$ac_sys_system" = xDarwin + if test "x$ac_sys_system" = xDarwin then : - as_fn_append CURSES_CFLAGS " -D_XOPEN_SOURCE_EXTENDED=1" + as_fn_append CURSES_CFLAGS " -D_XOPEN_SOURCE_EXTENDED=1" fi -PANEL_CFLAGS=$(echo $PANEL_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g') + PANEL_CFLAGS=$(echo $PANEL_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g') -# On Solaris, term.h requires curses.h -ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" " -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + # On Solaris, term.h requires curses.h + ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" " + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif " if test "x$ac_cv_header_term_h" = xyes @@ -28845,8 +28870,8 @@ then : fi -# On HP/UX 11.0, mvwdelch is a block with a return statement -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5 + # On HP/UX 11.0, mvwdelch is a block with a return statement + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5 printf %s "checking whether mvwdelch is an expression... " >&6; } if test ${ac_cv_mvwdelch_is_expression+y} then : @@ -28855,27 +28880,27 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - int rtn; - rtn = mvwdelch(0,0,0); + int rtn; + rtn = mvwdelch(0,0,0); ; return 0; @@ -28894,14 +28919,14 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5 printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; } -if test "$ac_cv_mvwdelch_is_expression" = yes -then + if test "$ac_cv_mvwdelch_is_expression" = yes + then printf "%s\n" "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h -fi + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5 printf %s "checking whether WINDOW has _flags... " >&6; } if test ${ac_cv_window_has_flags+y} then : @@ -28910,27 +28935,27 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - WINDOW *w; - w->_flags = 0; + WINDOW *w; + w->_flags = 0; ; return 0; @@ -28950,18 +28975,18 @@ fi printf "%s\n" "$ac_cv_window_has_flags" >&6; } -if test "$ac_cv_window_has_flags" = yes -then + if test "$ac_cv_window_has_flags" = yes + then printf "%s\n" "#define WINDOW_HAS_FLAGS 1" >>confdefs.h -fi + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function is_pad" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function is_pad" >&5 printf %s "checking for curses function is_pad... " >&6; } if test ${ac_cv_lib_curses_is_pad+y} then : @@ -28970,28 +28995,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef is_pad - void *x=is_pad - #endif + #ifndef is_pad + void *x=is_pad + #endif ; return 0; @@ -29005,12 +29030,12 @@ else case e in #( 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_lib_curses_is_pad" >&5 printf "%s\n" "$ac_cv_lib_curses_is_pad" >&6; } - if test "x$ac_cv_lib_curses_is_pad" = xyes + if test "x$ac_cv_lib_curses_is_pad" = xyes then : printf "%s\n" "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h @@ -29021,7 +29046,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function is_term_resized" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function is_term_resized" >&5 printf %s "checking for curses function is_term_resized... " >&6; } if test ${ac_cv_lib_curses_is_term_resized+y} then : @@ -29030,28 +29055,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef is_term_resized - void *x=is_term_resized - #endif + #ifndef is_term_resized + void *x=is_term_resized + #endif ; return 0; @@ -29065,12 +29090,12 @@ else case e in #( 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_lib_curses_is_term_resized" >&5 printf "%s\n" "$ac_cv_lib_curses_is_term_resized" >&6; } - if test "x$ac_cv_lib_curses_is_term_resized" = xyes + if test "x$ac_cv_lib_curses_is_term_resized" = xyes then : printf "%s\n" "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h @@ -29081,7 +29106,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function resize_term" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function resize_term" >&5 printf %s "checking for curses function resize_term... " >&6; } if test ${ac_cv_lib_curses_resize_term+y} then : @@ -29090,28 +29115,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef resize_term - void *x=resize_term - #endif + #ifndef resize_term + void *x=resize_term + #endif ; return 0; @@ -29125,12 +29150,12 @@ else case e in #( 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_lib_curses_resize_term" >&5 printf "%s\n" "$ac_cv_lib_curses_resize_term" >&6; } - if test "x$ac_cv_lib_curses_resize_term" = xyes + if test "x$ac_cv_lib_curses_resize_term" = xyes then : printf "%s\n" "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h @@ -29141,7 +29166,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function resizeterm" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function resizeterm" >&5 printf %s "checking for curses function resizeterm... " >&6; } if test ${ac_cv_lib_curses_resizeterm+y} then : @@ -29150,28 +29175,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef resizeterm - void *x=resizeterm - #endif + #ifndef resizeterm + void *x=resizeterm + #endif ; return 0; @@ -29185,12 +29210,12 @@ else case e in #( 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_lib_curses_resizeterm" >&5 printf "%s\n" "$ac_cv_lib_curses_resizeterm" >&6; } - if test "x$ac_cv_lib_curses_resizeterm" = xyes + if test "x$ac_cv_lib_curses_resizeterm" = xyes then : printf "%s\n" "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h @@ -29201,7 +29226,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function immedok" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function immedok" >&5 printf %s "checking for curses function immedok... " >&6; } if test ${ac_cv_lib_curses_immedok+y} then : @@ -29210,28 +29235,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef immedok - void *x=immedok - #endif + #ifndef immedok + void *x=immedok + #endif ; return 0; @@ -29245,12 +29270,12 @@ else case e in #( 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_lib_curses_immedok" >&5 printf "%s\n" "$ac_cv_lib_curses_immedok" >&6; } - if test "x$ac_cv_lib_curses_immedok" = xyes + if test "x$ac_cv_lib_curses_immedok" = xyes then : printf "%s\n" "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h @@ -29261,7 +29286,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function syncok" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function syncok" >&5 printf %s "checking for curses function syncok... " >&6; } if test ${ac_cv_lib_curses_syncok+y} then : @@ -29270,28 +29295,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef syncok - void *x=syncok - #endif + #ifndef syncok + void *x=syncok + #endif ; return 0; @@ -29305,12 +29330,12 @@ else case e in #( 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_lib_curses_syncok" >&5 printf "%s\n" "$ac_cv_lib_curses_syncok" >&6; } - if test "x$ac_cv_lib_curses_syncok" = xyes + if test "x$ac_cv_lib_curses_syncok" = xyes then : printf "%s\n" "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h @@ -29321,7 +29346,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function wchgat" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function wchgat" >&5 printf %s "checking for curses function wchgat... " >&6; } if test ${ac_cv_lib_curses_wchgat+y} then : @@ -29330,28 +29355,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef wchgat - void *x=wchgat - #endif + #ifndef wchgat + void *x=wchgat + #endif ; return 0; @@ -29365,12 +29390,12 @@ else case e in #( 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_lib_curses_wchgat" >&5 printf "%s\n" "$ac_cv_lib_curses_wchgat" >&6; } - if test "x$ac_cv_lib_curses_wchgat" = xyes + if test "x$ac_cv_lib_curses_wchgat" = xyes then : printf "%s\n" "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h @@ -29381,7 +29406,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function filter" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function filter" >&5 printf %s "checking for curses function filter... " >&6; } if test ${ac_cv_lib_curses_filter+y} then : @@ -29390,28 +29415,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef filter - void *x=filter - #endif + #ifndef filter + void *x=filter + #endif ; return 0; @@ -29425,12 +29450,12 @@ else case e in #( 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_lib_curses_filter" >&5 printf "%s\n" "$ac_cv_lib_curses_filter" >&6; } - if test "x$ac_cv_lib_curses_filter" = xyes + if test "x$ac_cv_lib_curses_filter" = xyes then : printf "%s\n" "#define HAVE_CURSES_FILTER 1" >>confdefs.h @@ -29441,7 +29466,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function has_key" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function has_key" >&5 printf %s "checking for curses function has_key... " >&6; } if test ${ac_cv_lib_curses_has_key+y} then : @@ -29450,28 +29475,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef has_key - void *x=has_key - #endif + #ifndef has_key + void *x=has_key + #endif ; return 0; @@ -29485,12 +29510,12 @@ else case e in #( 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_lib_curses_has_key" >&5 printf "%s\n" "$ac_cv_lib_curses_has_key" >&6; } - if test "x$ac_cv_lib_curses_has_key" = xyes + if test "x$ac_cv_lib_curses_has_key" = xyes then : printf "%s\n" "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h @@ -29501,7 +29526,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function typeahead" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function typeahead" >&5 printf %s "checking for curses function typeahead... " >&6; } if test ${ac_cv_lib_curses_typeahead+y} then : @@ -29510,28 +29535,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef typeahead - void *x=typeahead - #endif + #ifndef typeahead + void *x=typeahead + #endif ; return 0; @@ -29545,12 +29570,12 @@ else case e in #( 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_lib_curses_typeahead" >&5 printf "%s\n" "$ac_cv_lib_curses_typeahead" >&6; } - if test "x$ac_cv_lib_curses_typeahead" = xyes + if test "x$ac_cv_lib_curses_typeahead" = xyes then : printf "%s\n" "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h @@ -29561,7 +29586,7 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function use_env" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function use_env" >&5 printf %s "checking for curses function use_env... " >&6; } if test ${ac_cv_lib_curses_use_env+y} then : @@ -29570,28 +29595,28 @@ else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif int main (void) { - #ifndef use_env - void *x=use_env - #endif + #ifndef use_env + void *x=use_env + #endif ; return 0; @@ -29605,12 +29630,12 @@ else case e in #( 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_lib_curses_use_env" >&5 printf "%s\n" "$ac_cv_lib_curses_use_env" >&6; } - if test "x$ac_cv_lib_curses_use_env" = xyes + if test "x$ac_cv_lib_curses_use_env" = xyes then : printf "%s\n" "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h @@ -29619,7 +29644,7 @@ fi -CPPFLAGS=$ac_save_cppflags + CPPFLAGS=$ac_save_cppflags fi CFLAGS=$save_CFLAGS @@ -29627,6 +29652,7 @@ CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS +fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} diff --git a/configure.ac b/configure.ac index cc7a6e9397dded..d376eea98f3f27 100644 --- a/configure.ac +++ b/configure.ac @@ -6838,166 +6838,176 @@ dnl have_panel=[no, yes] have_curses=no have_panel=no -dnl PY_CHECK_CURSES(LIBCURSES, LIBPANEL) -dnl Sets 'have_curses' and 'have_panel'. -dnl For the PKG_CHECK_MODULES() calls, we can safely reuse the first variable -dnl here, since we're only calling the macro a second time if the first call -dnl fails. -AC_DEFUN([PY_CHECK_CURSES], [dnl -AS_VAR_PUSHDEF([curses_var], [m4_toupper([$1])]) -AS_VAR_PUSHDEF([panel_var], [m4_toupper([$2])]) -PKG_CHECK_MODULES([CURSES], [$1], - [AC_DEFINE([HAVE_]curses_var, [1], [Define if you have the '$1' library]) - AS_VAR_SET([have_curses], [yes]) - PKG_CHECK_MODULES([PANEL], [$2], - [AC_DEFINE([HAVE_]panel_var, [1], [Define if you have the '$2' library]) - AS_VAR_SET([have_panel], [yes])], - [AS_VAR_SET([have_panel], [no])])], - [AS_VAR_SET([have_curses], [no])]) -AS_VAR_POPDEF([curses_var]) -AS_VAR_POPDEF([panel_var])]) - -# Check for ncursesw/panelw first. If that fails, try ncurses/panel. -PY_CHECK_CURSES([ncursesw], [panelw]) -AS_VAR_IF([have_curses], [no], - [PY_CHECK_CURSES([ncurses], [panel])]) - -WITH_SAVE_ENV([ - # Make sure we've got the header defines. - AS_VAR_APPEND([CPPFLAGS], [" $CURSES_CFLAGS $PANEL_CFLAGS"]) - AC_CHECK_HEADERS(m4_normalize([ - ncursesw/curses.h ncursesw/ncurses.h ncursesw/panel.h - ncurses/curses.h ncurses/ncurses.h ncurses/panel.h - curses.h ncurses.h panel.h - ])) - - # Check that we're able to link with crucial curses/panel functions. This - # also serves as a fallback in case pkg-config failed. - AS_VAR_APPEND([LIBS], [" $CURSES_LIBS $PANEL_LIBS"]) - AC_SEARCH_LIBS([initscr], [ncursesw ncurses], - [AS_VAR_IF([have_curses], [no], - [AS_VAR_SET([have_curses], [yes]) - CURSES_LIBS=${CURSES_LIBS-"$ac_cv_search_initscr"}])], +AC_MSG_CHECKING([for --disable-curses]) +AC_ARG_ENABLE([curses], [AS_HELP_STRING( + [--disable-curses], + [disable building curses module (default is no)])], [ + AS_VAR_IF([enable_curses], [yes], [Py_CHECK_NCURSES=yes], [Py_CHECK_NCURSES=no]) +], [Py_CHECK_NCURSES=yes]) +AC_MSG_RESULT([$Py_CHECK_NCURSES]) + +if test "$Py_CHECK_NCURSES" == 'yes' ; then + dnl PY_CHECK_CURSES(LIBCURSES, LIBPANEL) + dnl Sets 'have_curses' and 'have_panel'. + dnl For the PKG_CHECK_MODULES() calls, we can safely reuse the first variable + dnl here, since we're only calling the macro a second time if the first call + dnl fails. + AC_DEFUN([PY_CHECK_CURSES], [dnl + AS_VAR_PUSHDEF([curses_var], [m4_toupper([$1])]) + AS_VAR_PUSHDEF([panel_var], [m4_toupper([$2])]) + PKG_CHECK_MODULES([CURSES], [$1], + [AC_DEFINE([HAVE_]curses_var, [1], [Define if you have the '$1' library]) + AS_VAR_SET([have_curses], [yes]) + PKG_CHECK_MODULES([PANEL], [$2], + [AC_DEFINE([HAVE_]panel_var, [1], [Define if you have the '$2' library]) + AS_VAR_SET([have_panel], [yes])], + [AS_VAR_SET([have_panel], [no])])], [AS_VAR_SET([have_curses], [no])]) - AC_SEARCH_LIBS([update_panels], [panelw panel], - [AS_VAR_IF([have_panel], [no], - [AS_VAR_SET([have_panel], [yes]) - PANEL_LIBS=${PANEL_LIBS-"$ac_cv_search_update_panels"}])], - [AS_VAR_SET([have_panel], [no])]) - -dnl Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque -dnl structs since version 5.7. If the macro is defined as zero before including -dnl [n]curses.h, ncurses will expose fields of the structs regardless of the -dnl configuration. -AC_DEFUN([_CURSES_INCLUDES],dnl -[ -#define NCURSES_OPAQUE 0 -#if defined(HAVE_NCURSESW_NCURSES_H) -# include -#elif defined(HAVE_NCURSESW_CURSES_H) -# include -#elif defined(HAVE_NCURSES_NCURSES_H) -# include -#elif defined(HAVE_NCURSES_CURSES_H) -# include -#elif defined(HAVE_NCURSES_H) -# include -#elif defined(HAVE_CURSES_H) -# include -#endif -]) + AS_VAR_POPDEF([curses_var]) + AS_VAR_POPDEF([panel_var])]) -AS_IF([test "have_curses" != "no"], [ -dnl remove _XOPEN_SOURCE macro from curses cflags. pyconfig.h sets -dnl the macro to 700. -CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g') + # Check for ncursesw/panelw first. If that fails, try ncurses/panel. + PY_CHECK_CURSES([ncursesw], [panelw]) + AS_VAR_IF([have_curses], [no], + [PY_CHECK_CURSES([ncurses], [panel])]) -AS_VAR_IF([ac_sys_system], [Darwin], [ - dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw. - dnl System-supplied ncurses combines libncurses/libpanel and supports wide - dnl characters, so we can use it like ncursesw. - dnl If a locally-supplied version of libncursesw is found, we will use that. - dnl There should also be a libpanelw. - dnl _XOPEN_SOURCE defines are usually excluded for macOS, but we need - dnl _XOPEN_SOURCE_EXTENDED here for ncurses wide char support. + WITH_SAVE_ENV([ + # Make sure we've got the header defines. + AS_VAR_APPEND([CPPFLAGS], [" $CURSES_CFLAGS $PANEL_CFLAGS"]) + AC_CHECK_HEADERS(m4_normalize([ + ncursesw/curses.h ncursesw/ncurses.h ncursesw/panel.h + ncurses/curses.h ncurses/ncurses.h ncurses/panel.h + curses.h ncurses.h panel.h + ])) + + # Check that we're able to link with crucial curses/panel functions. This + # also serves as a fallback in case pkg-config failed. + AS_VAR_APPEND([LIBS], [" $CURSES_LIBS $PANEL_LIBS"]) + AC_SEARCH_LIBS([initscr], [ncursesw ncurses], + [AS_VAR_IF([have_curses], [no], + [AS_VAR_SET([have_curses], [yes]) + CURSES_LIBS=${CURSES_LIBS-"$ac_cv_search_initscr"}])], + [AS_VAR_SET([have_curses], [no])]) + AC_SEARCH_LIBS([update_panels], [panelw panel], + [AS_VAR_IF([have_panel], [no], + [AS_VAR_SET([have_panel], [yes]) + PANEL_LIBS=${PANEL_LIBS-"$ac_cv_search_update_panels"}])], + [AS_VAR_SET([have_panel], [no])]) + + dnl Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque + dnl structs since version 5.7. If the macro is defined as zero before including + dnl [n]curses.h, ncurses will expose fields of the structs regardless of the + dnl configuration. + AC_DEFUN([_CURSES_INCLUDES],dnl + [ + #define NCURSES_OPAQUE 0 + #if defined(HAVE_NCURSESW_NCURSES_H) + # include + #elif defined(HAVE_NCURSESW_CURSES_H) + # include + #elif defined(HAVE_NCURSES_NCURSES_H) + # include + #elif defined(HAVE_NCURSES_CURSES_H) + # include + #elif defined(HAVE_NCURSES_H) + # include + #elif defined(HAVE_CURSES_H) + # include + #endif + ]) - AS_VAR_APPEND([CURSES_CFLAGS], [" -D_XOPEN_SOURCE_EXTENDED=1"]) -]) + AS_IF([test "have_curses" != "no"], [ + dnl remove _XOPEN_SOURCE macro from curses cflags. pyconfig.h sets + dnl the macro to 700. + CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g') + + AS_VAR_IF([ac_sys_system], [Darwin], [ + dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw. + dnl System-supplied ncurses combines libncurses/libpanel and supports wide + dnl characters, so we can use it like ncursesw. + dnl If a locally-supplied version of libncursesw is found, we will use that. + dnl There should also be a libpanelw. + dnl _XOPEN_SOURCE defines are usually excluded for macOS, but we need + dnl _XOPEN_SOURCE_EXTENDED here for ncurses wide char support. + + AS_VAR_APPEND([CURSES_CFLAGS], [" -D_XOPEN_SOURCE_EXTENDED=1"]) + ]) -dnl pyconfig.h defines _XOPEN_SOURCE=700 -PANEL_CFLAGS=$(echo $PANEL_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g') + dnl pyconfig.h defines _XOPEN_SOURCE=700 + PANEL_CFLAGS=$(echo $PANEL_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g') -# On Solaris, term.h requires curses.h -AC_CHECK_HEADERS([term.h], [], [], _CURSES_INCLUDES) + # On Solaris, term.h requires curses.h + AC_CHECK_HEADERS([term.h], [], [], _CURSES_INCLUDES) -# On HP/UX 11.0, mvwdelch is a block with a return statement -AC_CACHE_CHECK([whether mvwdelch is an expression], [ac_cv_mvwdelch_is_expression], -AC_COMPILE_IFELSE([AC_LANG_PROGRAM(_CURSES_INCLUDES, [[ - int rtn; - rtn = mvwdelch(0,0,0); -]])], -[ac_cv_mvwdelch_is_expression=yes], -[ac_cv_mvwdelch_is_expression=no])) + # On HP/UX 11.0, mvwdelch is a block with a return statement + AC_CACHE_CHECK([whether mvwdelch is an expression], [ac_cv_mvwdelch_is_expression], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(_CURSES_INCLUDES, [[ + int rtn; + rtn = mvwdelch(0,0,0); + ]])], + [ac_cv_mvwdelch_is_expression=yes], + [ac_cv_mvwdelch_is_expression=no])) -if test "$ac_cv_mvwdelch_is_expression" = yes -then - AC_DEFINE([MVWDELCH_IS_EXPRESSION], [1], - [Define if mvwdelch in curses.h is an expression.]) -fi + if test "$ac_cv_mvwdelch_is_expression" = yes + then + AC_DEFINE([MVWDELCH_IS_EXPRESSION], [1], + [Define if mvwdelch in curses.h is an expression.]) + fi -AC_CACHE_CHECK([whether WINDOW has _flags], [ac_cv_window_has_flags], -AC_COMPILE_IFELSE([AC_LANG_PROGRAM(_CURSES_INCLUDES, [[ - WINDOW *w; - w->_flags = 0; -]])], -[ac_cv_window_has_flags=yes], -[ac_cv_window_has_flags=no])) + AC_CACHE_CHECK([whether WINDOW has _flags], [ac_cv_window_has_flags], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(_CURSES_INCLUDES, [[ + WINDOW *w; + w->_flags = 0; + ]])], + [ac_cv_window_has_flags=yes], + [ac_cv_window_has_flags=no])) -if test "$ac_cv_window_has_flags" = yes -then - AC_DEFINE([WINDOW_HAS_FLAGS], [1], - [Define if WINDOW in curses.h offers a field _flags.]) -fi + if test "$ac_cv_window_has_flags" = yes + then + AC_DEFINE([WINDOW_HAS_FLAGS], [1], + [Define if WINDOW in curses.h offers a field _flags.]) + fi -dnl PY_CHECK_CURSES_FUNC(FUNCTION) -AC_DEFUN([PY_CHECK_CURSES_FUNC], -[ AS_VAR_PUSHDEF([py_var], [ac_cv_lib_curses_$1]) - AS_VAR_PUSHDEF([py_define], [HAVE_CURSES_]m4_toupper($1)) - AC_CACHE_CHECK( - [for curses function $1], - [py_var], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM(_CURSES_INCLUDES, [ - #ifndef $1 - void *x=$1 - #endif - ])], - [AS_VAR_SET([py_var], [yes])], - [AS_VAR_SET([py_var], [no])])] - ) - AS_VAR_IF( - [py_var], - [yes], - [AC_DEFINE([py_define], [1], [Define if you have the '$1' function.])]) - AS_VAR_POPDEF([py_var]) - AS_VAR_POPDEF([py_define]) -]) + dnl PY_CHECK_CURSES_FUNC(FUNCTION) + AC_DEFUN([PY_CHECK_CURSES_FUNC], + [ AS_VAR_PUSHDEF([py_var], [ac_cv_lib_curses_$1]) + AS_VAR_PUSHDEF([py_define], [HAVE_CURSES_]m4_toupper($1)) + AC_CACHE_CHECK( + [for curses function $1], + [py_var], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM(_CURSES_INCLUDES, [ + #ifndef $1 + void *x=$1 + #endif + ])], + [AS_VAR_SET([py_var], [yes])], + [AS_VAR_SET([py_var], [no])])] + ) + AS_VAR_IF( + [py_var], + [yes], + [AC_DEFINE([py_define], [1], [Define if you have the '$1' function.])]) + AS_VAR_POPDEF([py_var]) + AS_VAR_POPDEF([py_define]) + ]) -PY_CHECK_CURSES_FUNC([is_pad]) -PY_CHECK_CURSES_FUNC([is_term_resized]) -PY_CHECK_CURSES_FUNC([resize_term]) -PY_CHECK_CURSES_FUNC([resizeterm]) -PY_CHECK_CURSES_FUNC([immedok]) -PY_CHECK_CURSES_FUNC([syncok]) -PY_CHECK_CURSES_FUNC([wchgat]) -PY_CHECK_CURSES_FUNC([filter]) -PY_CHECK_CURSES_FUNC([has_key]) -PY_CHECK_CURSES_FUNC([typeahead]) -PY_CHECK_CURSES_FUNC([use_env]) -CPPFLAGS=$ac_save_cppflags -])dnl have_curses != no -])dnl save env + PY_CHECK_CURSES_FUNC([is_pad]) + PY_CHECK_CURSES_FUNC([is_term_resized]) + PY_CHECK_CURSES_FUNC([resize_term]) + PY_CHECK_CURSES_FUNC([resizeterm]) + PY_CHECK_CURSES_FUNC([immedok]) + PY_CHECK_CURSES_FUNC([syncok]) + PY_CHECK_CURSES_FUNC([wchgat]) + PY_CHECK_CURSES_FUNC([filter]) + PY_CHECK_CURSES_FUNC([has_key]) + PY_CHECK_CURSES_FUNC([typeahead]) + PY_CHECK_CURSES_FUNC([use_env]) + CPPFLAGS=$ac_save_cppflags + ])dnl have_curses != no + ])dnl save env +fi AC_MSG_NOTICE([checking for device files]) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy