diff --git a/.gitignore b/.gitignore index c3fc748ea97c33..e4ece53735ecb6 100644 --- a/.gitignore +++ b/.gitignore @@ -66,6 +66,7 @@ Misc/python-embed.pc Misc/python-config.sh Modules/Setup.config Modules/Setup.local +Modules/Setup Modules/config.c Modules/ld_so_aix Programs/_freeze_module diff --git a/Makefile.pre.in b/Makefile.pre.in index 60acc16beeee3f..1310185339835b 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -203,11 +203,48 @@ RUNSHARED= @RUNSHARED@ ENSUREPIP= @ENSUREPIP@ # OpenSSL options for setup.py so sysconfig can pick up AC_SUBST() vars. +MODULE__SSL_CFLAGS=@OPENSSL_INCLUDES@ +MODULE__SSL_LDFLAGS=@OPENSSL_LIBS@ @OPENSSL_LDFLAGS@ +MODULE__HASHLIB_CFLAGS=@OPENSSL_INCLUDES@ +MODULE__HASHLIB_LDFLAGS=@OPENSSL_LIBS@ @OPENSSL_LDFLAGS@ OPENSSL_INCLUDES=@OPENSSL_INCLUDES@ OPENSSL_LIBS=@OPENSSL_LIBS@ OPENSSL_LDFLAGS=@OPENSSL_LDFLAGS@ OPENSSL_RPATH=@OPENSSL_RPATH@ +# extension module flags +# detected manually +READLINE_LIBS=@READLINE_LIBS@ +READLINE_CFLAGS=@READLINE_CFLAGS@ +TCLTK_LIBS=@TCLTK_LIBS@ +TCLTK_CFLAGS=@TCLTK_INCLUDES@ + +# detected with PKG_WITH_MODULES_OPTIONAL macro +NCURSESW_LIBS=@NCURSESW_LIBS@ +NCURSESW_CFLAGS=@NCURSESW_CFLAGS@ +CURSES_LIBS=@CURSES_LIBS@ +CURSES_CFLAGS=@CURSES_CFLAGS@ +CURSES_PANEL_LIBS=@CURSES_PANEL_LIBS@ +CURSES_PANEL_CFLAGS=@CURSES_PANEL_CFLAGS@ +SQLITE3_LIBS=@SQLITE3_LIBS@ +SQLITE3_CFLAGS=@SQLITE3_CFLAGS@ +ZLIB_LIBS=@ZLIB_LIBS@ +ZLIB_CFLAGS=@ZLIB_CFLAGS@ +BZ2_LIBS=@BZ2_LIBS@ +BZ2_CFLAGS=@BZ2_CFLAGS@ +LZMA_LIBS=@LZMA_LIBS@ +LZMA_CFLAGS=@LZMA_CFLAGS@ +EXPAT_LIBS=@EXPAT_LIBS@ +EXPAT_CFLAGS=@EXPAT_CFLAGS@ +UUID_LIBS=@UUID_LIBS@ +UUID_CFLAGS=@UUID_CFLAGS@ +FFI_LIBS=@FFI_LIBS@ +FFI_CFLAGS=@FFI_CFLAGS@ +NIS_LIBS=@NIS_LIBS@ +NIS_CFLAGS=@NIS_CFLAGS@ +CRYPT_LIBS=@CRYPT_LIBS@ +CRYPT_CFLAGS=@CRYPT_CFLAGS@ + # Default zoneinfo.TZPATH. Added here to expose it in sysconfig.get_config_var TZPATH=@TZPATH@ @@ -705,13 +742,24 @@ $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) fi -oldsharedmods: $(SHAREDMODS) +oldsharedmods: $(SHAREDMODS) pybuilddir.txt + # create relative links from build/lib.platform/egg.so to Modules/egg.so + # pybuilddir.txt is created too late. We cannot use it in Makefile + # targets. FreeBSD's ln does not have --relative option. + @target=`cat pybuilddir.txt`; \ + for mod in X $(SHAREDMODS); do \ + if test $$mod != X; then \ + $(LN) -sf ../../$$mod $$target/`basename $$mod`; \ + fi; \ + done +Modules/Setup: $(srcdir)/Modules/Setup.in + ./config.status --file=$@ Makefile Modules/config.c: Makefile.pre \ $(srcdir)/Modules/config.c.in \ $(MAKESETUP) \ - $(srcdir)/Modules/Setup \ + Modules/Setup \ Modules/Setup.local $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \ -s Modules \ diff --git a/Modules/Setup b/Modules/Setup.in similarity index 86% rename from Modules/Setup rename to Modules/Setup.in index 992ffecb334d58..e7424bf2274058 100644 --- a/Modules/Setup +++ b/Modules/Setup.in @@ -179,7 +179,7 @@ time timemodule.c #binascii binascii.c #cmath cmathmodule.c #math mathmodule.c -#pyexpat -I$(srcdir)/Modules/expat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c +#pyexpat -I$(srcdir)/Modules/expat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c #unicodedata unicodedata.c # Modules with some UNIX dependencies -- on by default: @@ -199,21 +199,22 @@ time timemodule.c # Some more UNIX dependent modules -- off by default, since these # are not supported by all UNIX systems: -#_crypt _cryptmodule.c -lcrypt # crypt(3); breaks many builds. -#nis nismodule.c -I/usr/include/tirpc -lnsl -ltirpc # Sun yellow pages -- not everywhere +#@HAVE_CURSES_TRUE@_crypt _cryptmodule.c $(CRYPT_CFLAGS) $(CRYPT_LIBS) # crypt(3); breaks many builds. +#@HAVE_NIS_TRUE@nis nismodule.c $(NIS_CFLAGS) $(NIS_LIBS) # Sun yellow pages -- not everywhere #termios termios.c # Steen Lumholt's termios module #resource resource.c # Jeremy Hylton's rlimit interface # Modules that require external libraries. -#_bz2 _bz2module.c -lbz2 -#_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -ldl -lffi -DHAVE_FFI_PREP_CIF_VAR -DHAVE_FFI_PREP_CLOSURE_LOC -DHAVE_FFI_CLOSURE_ALLOC -# _dbm _dbmmodule.c # -lndbm # dbm(3) -#_gdbm _gdbmmodule.c -lgdbm -#_lzma _lzmamodule.c -llzma -#_sqlite3 _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -lsqlite3 -#_uuid _uuidmodule.c -luuid -#zlib zlibmodule.c -lz +#@HAVE_BZ2_TRUE@_bz2 _bz2module.c $(BZ2_CFLAGS) $(BZ2_LIBS) +#@HAVE_FFI_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c $(FFI_CFLAGS) $(FFI_LIBS) -DHAVE_FFI_PREP_CIF_VAR -DHAVE_FFI_PREP_CLOSURE_LOC -DHAVE_FFI_CLOSURE_ALLOC +#@HAVE_DBM_TRUE@_dbm _dbmmodule.c # -lndbm # dbm(3) +#@HAVE_GDBM_TRUE@_gdbm _gdbmmodule.c -lgdbm +#@HAVE_LZMA_TRUE@_lzma _lzmamodule.c $(LZMA_CFLAGS) $(LZMA_LIBS) +#@HAVE_SQLITE3_TRUE@_sqlite3 _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c $(SQLITE3_CFLAGS) $(SQLITE3_LIBS) +#@HAVE_UUID_TRUE@_uuid _uuidmodule.c $(UUID_CFLAGS) $(UUID_LIBS) +#@HAVE_ZLIB_TRUE@zlib zlibmodule.c $(ZLIB_CFLAGS) $(ZLIB_LIBS) + # GNU readline. Unlike previous Python incarnations, GNU readline is # now incorporated in an optional module, configured in the Setup file @@ -223,11 +224,12 @@ time timemodule.c # it, depending on your system -- see the GNU readline instructions. # It's okay for this to be a shared library, too. -#readline readline.c -lreadline -ltermcap +# readline readline.c -lreadline -ltermcap +#readline readline.c $(READLINE_CFLAGS) $(READLINE_LIBS) # To dynamically link OpenSSL: -#_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) -#_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto +#@HAVE_OPENSSL_TRUE@_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) +#@HAVE_OPENSSL_TRUE@_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto # To statically link OpenSSL: # _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ @@ -248,7 +250,7 @@ time timemodule.c # every system. # *** Always uncomment this (leave the leading underscore in!): -#_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \ +#@HAVE_TCLTK_TRUE@_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \ # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: # -L/usr/local/lib \ # *** Uncomment and edit to reflect where your Tcl/Tk headers are: @@ -281,13 +283,13 @@ time timemodule.c # provided by the ncurses library. e.g. on Linux, link with -lncurses # instead of -lcurses). -#_curses -lcurses -lcursesw -ltermcap _cursesmodule.c +#@HAVE_CURSES_TRUE@_curses _cursesmodule.c $(NCURSESW_CFLAGS) $(NCURSESW_LIBS) $(CURSES_CFLAGS) $(CURSES_LIBS) # Wrapper for the panel library that's part of ncurses and SYSV curses. -#_curses_panel -lpanel -lncurses _curses_panel.c +#@HAVE_CURSES_PANEL_TRUE@_curses_panel _curses_panel.c $(CURSES_PANEL_CFLAGS) $(CURSES_PANEL_LIBS) # macOS specific modules -# _scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation +#@HAVE_SCPROXY_TRUE@_scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation # Examples @@ -300,7 +302,7 @@ xxsubtype xxsubtype.c # Required for the test suite to pass! #_xxsubinterpreters _xxsubinterpretersmodule.c #_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c -#_ctypes_test _ctypes/_ctypes_test.c +#@HAVE_FFI_TRUE@_ctypes_test _ctypes/_ctypes_test.c #_testbuffer _testbuffer.c #_testimportmultiple _testimportmultiple.c #_testinternalcapi _testinternalcapi.c diff --git a/aclocal.m4 b/aclocal.m4 index 2f1bd37528c85d..6a33c0cc9d9e8c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -619,3 +619,53 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + diff --git a/configure b/configure index 72463d22714977..0518b91e4f6379 100755 --- a/configure +++ b/configure @@ -626,13 +626,67 @@ ac_subst_vars='LTLIBOBJS TEST_MODULES LIBRARY_DEPS STATIC_LIBPYTHON +HAVE_OPENSSL_FALSE +HAVE_OPENSSL_TRUE OPENSSL_RPATH OPENSSL_LDFLAGS OPENSSL_LIBS OPENSSL_INCLUDES +HAVE_SCPROXY_FALSE +HAVE_SCPROXY_TRUE +HAVE_CRYPT_FALSE +HAVE_CRYPT_TRUE +CRYPT_LIBS +CRYPT_CFLAGS +HAVE_NIS_FALSE +HAVE_NIS_TRUE +NIS_LIBS +NIS_CFLAGS +HAVE_FFI_FALSE +HAVE_FFI_TRUE +FFI_LIBS +FFI_CFLAGS +HAVE_UUID_FALSE +HAVE_UUID_TRUE +UUID_LIBS +UUID_CFLAGS +HAVE_EXPAT_FALSE +HAVE_EXPAT_TRUE +EXPAT_LIBS +EXPAT_CFLAGS +HAVE_LZMA_FALSE +HAVE_LZMA_TRUE +LZMA_LIBS +LZMA_CFLAGS +HAVE_BZ2_FALSE +HAVE_BZ2_TRUE +BZ2_LIBS +BZ2_CFLAGS +HAVE_ZLIB_FALSE +HAVE_ZLIB_TRUE +ZLIB_LIBS +ZLIB_CFLAGS +HAVE_SQLITE3_FALSE +HAVE_SQLITE3_TRUE +SQLITE3_LIBS +SQLITE3_CFLAGS +HAVE_CURSES_PANEL_FALSE +HAVE_CURSES_PANEL_TRUE +CURSES_PANEL_LIBS +CURSES_PANEL_CFLAGS +NCURSESW_LIBS +NCURSESW_CFLAGS +CURSES_LIBS +CURSES_CFLAGS +HAVE_CURSES_FALSE +HAVE_CURSES_TRUE ENSUREPIP SRCDIRS THREADHEADERS +HAVE_READLINE_FALSE +HAVE_READLINE_TRUE +READLINE_CFLAGS +READLINE_LIBS WHEEL_PKG_DIR LIBPL PY_ENABLE_SHARED @@ -658,6 +712,12 @@ DTRACE_OBJS DTRACE_HEADERS DFLAGS DTRACE +HAVE_GDBM_FALSE +HAVE_GDBM_TRUE +HAVE_DBM_FALSE +HAVE_DBM_TRUE +HAVE_TCLTK_FALSE +HAVE_TCLTK_TRUE TCLTK_LIBS TCLTK_INCLUDES LIBFFI_INCLUDEDIR @@ -858,6 +918,18 @@ with_wheel_pkg_dir with_readline with_computed_gotos with_ensurepip +with_ncursesw +with_curses +with_curses_panel +with_sqlite3 +with_zlib +with_bz2 +with_lzma +with_expat +with_uuid +with_ffi +with_nis +with_crypt with_openssl with_openssl_rpath with_ssl_default_suites @@ -879,7 +951,31 @@ CPP PROFILE_TASK PKG_CONFIG PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR' +PKG_CONFIG_LIBDIR +CURSES_CFLAGS +CURSES_LIBS +NCURSESW_CFLAGS +NCURSESW_LIBS +CURSES_PANEL_CFLAGS +CURSES_PANEL_LIBS +SQLITE3_CFLAGS +SQLITE3_LIBS +ZLIB_CFLAGS +ZLIB_LIBS +BZ2_CFLAGS +BZ2_LIBS +LZMA_CFLAGS +LZMA_LIBS +EXPAT_CFLAGS +EXPAT_LIBS +UUID_CFLAGS +UUID_LIBS +FFI_CFLAGS +FFI_LIBS +NIS_CFLAGS +NIS_LIBS +CRYPT_CFLAGS +CRYPT_LIBS' # Initialize some variables set by options. @@ -1611,6 +1707,17 @@ Optional Packages: --with-ensurepip[=install|upgrade|no] "install" or "upgrade" using bundled pip (default is upgrade) + --with-ncursesw build with ncursesw support [default=auto] + --with-curses_panel build with curses_panel support [default=auto] + --with-sqlite3 build with sqlite3 support [default=auto] + --with-zlib build with zlib support [default=auto] + --with-bz2 build with bz2 support [default=auto] + --with-lzma build with lzma support [default=auto] + --with-expat build with expat support [default=auto] + --with-uuid build with uuid support [default=auto] + --with-ffi build with ffi support [default=auto] + --with-nis build with nis support [default=auto] + --with-crypt build with crypt support [default=auto] --with-openssl=DIR root of the OpenSSL directory --with-openssl-rpath=[DIR|auto|no] Set runtime library directory (rpath) for OpenSSL @@ -1650,6 +1757,36 @@ Some influential environment variables: directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path + NCURSESW_CFLAGS + C compiler flags for NCURSESW, overriding pkg-config + NCURSESW_LIBS + linker flags for NCURSESW, overriding pkg-config + CURSES_PANEL_CFLAGS + C compiler flags for CURSES_PANEL, overriding pkg-config + CURSES_PANEL_LIBS + linker flags for CURSES_PANEL, overriding pkg-config + SQLITE3_CFLAGS + C compiler flags for SQLITE3, overriding pkg-config + SQLITE3_LIBS + linker flags for SQLITE3, overriding pkg-config + ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config + ZLIB_LIBS linker flags for ZLIB, overriding pkg-config + BZ2_CFLAGS C compiler flags for BZ2, overriding pkg-config + BZ2_LIBS linker flags for BZ2, overriding pkg-config + LZMA_CFLAGS C compiler flags for LZMA, overriding pkg-config + LZMA_LIBS linker flags for LZMA, overriding pkg-config + EXPAT_CFLAGS + C compiler flags for EXPAT, overriding pkg-config + EXPAT_LIBS linker flags for EXPAT, overriding pkg-config + UUID_CFLAGS C compiler flags for UUID, overriding pkg-config + UUID_LIBS linker flags for UUID, overriding pkg-config + FFI_CFLAGS C compiler flags for FFI, overriding pkg-config + FFI_LIBS linker flags for FFI, overriding pkg-config + NIS_CFLAGS C compiler flags for NIS, overriding pkg-config + NIS_LIBS linker flags for NIS, overriding pkg-config + CRYPT_CFLAGS + C compiler flags for CRYPT, overriding pkg-config + CRYPT_LIBS linker flags for CRYPT, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -10916,6 +11053,15 @@ else TCLTK_LIBS="$with_tcltk_libs" fi + if test -n "$TCLTK_LIBS"; then + HAVE_TCLTK_TRUE= + HAVE_TCLTK_FALSE='#' +else + HAVE_TCLTK_TRUE='#' + HAVE_TCLTK_FALSE= +fi + + # Check for --with-dbmliborder { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 $as_echo_n "checking for --with-dbmliborder... " >&6; } @@ -10939,6 +11085,67 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 $as_echo "$with_dbmliborder" >&6; } +# TODO + if false; then + HAVE_DBM_TRUE= + HAVE_DBM_FALSE='#' +else + HAVE_DBM_TRUE='#' + HAVE_DBM_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5 +$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; } +if ${ac_cv_lib_gdbm_gdbm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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. */ +#ifdef __cplusplus +extern "C" +#endif +char gdbm_open (); +int +main () +{ +return gdbm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gdbm_gdbm_open=yes +else + ac_cv_lib_gdbm_gdbm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5 +$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; } +if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then : + have_gdbm=yes +else + have_gdbm=no +fi + + if test $have_gdbm = yes; then + HAVE_GDBM_TRUE= + HAVE_GDBM_FALSE='#' +else + HAVE_GDBM_TRUE='#' + HAVE_GDBM_FALSE= +fi + + # Templates for things AC_DEFINEd more than once. # For a single AC_DEFINE, no template is needed. @@ -15993,8 +16200,10 @@ rm -f core conftest.err conftest.$ac_objext \ fi done - # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts - #AC_SUBST([READLINE_LIBS]) + + READLINE_CFLAGS="" + + if test $py_cv_lib_readline = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } @@ -16005,6 +16214,14 @@ $as_echo "$READLINE_LIBS" >&6; } $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h fi + if test $py_cv_lib_readline != no; then + HAVE_READLINE_TRUE= + HAVE_READLINE_FALSE='#' +else + HAVE_READLINE_TRUE='#' + HAVE_READLINE_FALSE= +fi + fi if test "$py_cv_lib_readline" = yes; then @@ -17288,7 +17505,23 @@ do done -SRCDIRS="Parser Objects Python Modules Modules/_io Programs" +SRCDIRS="\ + Modules \ + Modules/_blake2 \ + Modules/_ctypes \ + Modules/_decimal \ + Modules/_decimal/libmpdec \ + Modules/_io \ + Modules/_multiprocessing \ + Modules/_sha3 \ + Modules/_sqlite \ + Modules/_xxtestfuzz \ + Modules/cjkcodecs \ + Modules/expat \ + Objects \ + Parser \ + Programs \ + Python" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5 $as_echo_n "checking for build directories... " >&6; } for dir in $SRCDIRS; do @@ -17732,217 +17965,3141 @@ done LIBS="$save_LIBS" ac_includes_default="$save_includes_default" -# Check for usable OpenSSL +# PKG_WITH_MODULES_OPTIONAL( +# VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], +# [DESCRIPTION], [DEFAULT]) +# +# Like PKG_HAVE_DEFINE_WITH_MODULES() with optional module +# triggers AM_CONDITIONAL, AC_DEFINE, and exports as make var +# does not fail on error - found=false -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; - case "$withval" in - "" | y | ye | yes | n | no) - as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5 - ;; - *) ssldirs="$withval" - ;; - esac +# detect dependencies for modules +# libraries without pkg-config .pc files: +# gdbm/ndbm, libmpdec (decmimal) -else +# readline or editline are detected manually +#PKG_WITH_MODULES_OPTIONAL([READLINE], [readline], [], [ +# # fall back to libedit +# PKG_WITH_MODULES_OPTIONAL([READLINE], [libedit]) +#]) - # if pkg-config is installed and openssl has installed a .pc file, - # then use that information and don't search ssldirs - 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PKG_CONFIG"; then - ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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_PKG_CONFIG="${ac_tool_prefix}pkg-config" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +# define either ncursesw or curses -fi -fi -PKG_CONFIG=$ac_cv_prog_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + + + + + + + + + + + +# Check whether --with-ncursesw was given. +if test "${with_ncursesw+set}" = set; then : + withval=$with_ncursesw; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + with_ncursesw=auto fi -fi -if test -z "$ac_cv_prog_PKG_CONFIG"; then - ac_ct_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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 +case $with_ncursesw in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NCURSESW" >&5 +$as_echo_n "checking for NCURSESW... " >&6; } + +if test -n "$NCURSESW_CFLAGS"; then + pkg_cv_NCURSESW_CFLAGS="$NCURSESW_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NCURSESW_CFLAGS=`$PKG_CONFIG --cflags "ncursesw" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - if test -n "$ac_ct_PKG_CONFIG"; then - ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$NCURSESW_LIBS"; then + pkg_cv_NCURSESW_LIBS="$NCURSESW_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NCURSESW_LIBS=`$PKG_CONFIG --libs "ncursesw" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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_PKG_CONFIG="pkg-config" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - + pkg_failed=yes fi + else + pkg_failed=untried fi -ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG -if test -n "$ac_ct_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 -$as_echo "$ac_ct_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -fi - if test "x$ac_ct_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_ct_PKG_CONFIG - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - PKG_CONFIG="$ac_cv_prog_PKG_CONFIG" + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + NCURSESW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncursesw" 2>&1` + else + NCURSESW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncursesw" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$NCURSESW_PKG_ERRORS" >&5 - if test x"$PKG_CONFIG" != x""; then - OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null` - if test $? = 0; then - OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null` - OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null` - found=true - fi - fi - # no such luck; use some default ssldirs - if ! $found; then - ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr" - fi -fi - # note that we #include , so the OpenSSL headers have to be in - # an 'openssl' subdirectory - if ! $found; then - OPENSSL_INCLUDES= - for ssldir in $ssldirs; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5 -$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; } - if test -f "$ssldir/include/openssl/ssl.h"; then - OPENSSL_INCLUDES="-I$ssldir/include" - OPENSSL_LDFLAGS="-L$ssldir/lib" - OPENSSL_LIBS="-lssl -lcrypto" - found=true - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - break - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - done - # if the file wasn't found, well, go ahead and try the link anyway -- maybe - # it will just work! - fi - # try the preprocessor and linker with our new flags, - # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5 -$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; } - echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \ - "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5 - save_LIBS="$LIBS" - save_LDFLAGS="$LDFLAGS" - save_CPPFLAGS="$CPPFLAGS" - LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" - LIBS="$OPENSSL_LIBS $LIBS" - CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -SSL_new(NULL) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_openssl=yes + --with-curses build with curses support [default=auto] +# Check whether --with-curses was given. +if test "${with_curses+set}" = set; then : + withval=$with_curses; else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_openssl=no - + with_curses=auto fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" +case $with_curses in #( + yes) : + CURSES_CFLAGS + C compiler flags for CURSES, overriding pkg-config + CURSES_LIBS linker flags for CURSES, overriding pkg-config +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES" >&5 +$as_echo_n "checking for CURSES... " >&6; } +if test -n "$CURSES_CFLAGS"; then + pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_LIBS"; then + pkg_cv_CURSES_LIBS="$CURSES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi -# rpath to libssl and libcrypto -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5 -$as_echo_n "checking for --with-openssl-rpath... " >&6; } -# Check whether --with-openssl-rpath was given. -if test "${with_openssl_rpath+set}" = set; then : +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` + else + CURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES" >&5 +$as_echo_n "checking for CURSES... " >&6; } + +if test -n "$CURSES_CFLAGS"; then + pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_LIBS"; then + pkg_cv_CURSES_LIBS="$CURSES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` + else + CURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PKG_ERRORS" >&5 + + with_curses=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_curses=no + : +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_curses=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_curses" = "yes"; then + HAVE_CURSES_TRUE= + HAVE_CURSES_FALSE='#' +else + HAVE_CURSES_TRUE='#' + HAVE_CURSES_FALSE= +fi + +if test "$with_curses" = "yes"; then : + +$as_echo "#define HAVE_CURSES 1" >>confdefs.h + +fi + + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + + + + + + + + + + + + + --with-curses build with curses support [default=auto] +# Check whether --with-curses was given. +if test "${with_curses+set}" = set; then : + withval=$with_curses; +else + with_curses=auto +fi + + +case $with_curses in #( + yes) : + CURSES_CFLAGS + C compiler flags for CURSES, overriding pkg-config + CURSES_LIBS linker flags for CURSES, overriding pkg-config + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES" >&5 +$as_echo_n "checking for CURSES... " >&6; } + +if test -n "$CURSES_CFLAGS"; then + pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_LIBS"; then + pkg_cv_CURSES_LIBS="$CURSES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` + else + CURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES" >&5 +$as_echo_n "checking for CURSES... " >&6; } + +if test -n "$CURSES_CFLAGS"; then + pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_LIBS"; then + pkg_cv_CURSES_LIBS="$CURSES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` + else + CURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PKG_ERRORS" >&5 + + with_curses=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_curses=no + : +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_curses=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_curses" = "yes"; then + HAVE_CURSES_TRUE= + HAVE_CURSES_FALSE='#' +else + HAVE_CURSES_TRUE='#' + HAVE_CURSES_FALSE= +fi + +if test "$with_curses" = "yes"; then : + +$as_echo "#define HAVE_CURSES 1" >>confdefs.h + +fi + + +else + NCURSESW_CFLAGS=$pkg_cv_NCURSESW_CFLAGS + NCURSESW_LIBS=$pkg_cv_NCURSESW_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + if true; then + HAVE_CURSES_TRUE= + HAVE_CURSES_FALSE='#' +else + HAVE_CURSES_TRUE='#' + HAVE_CURSES_FALSE= +fi + + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NCURSESW" >&5 +$as_echo_n "checking for NCURSESW... " >&6; } + +if test -n "$NCURSESW_CFLAGS"; then + pkg_cv_NCURSESW_CFLAGS="$NCURSESW_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NCURSESW_CFLAGS=`$PKG_CONFIG --cflags "ncursesw" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$NCURSESW_LIBS"; then + pkg_cv_NCURSESW_LIBS="$NCURSESW_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NCURSESW_LIBS=`$PKG_CONFIG --libs "ncursesw" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + NCURSESW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncursesw" 2>&1` + else + NCURSESW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncursesw" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$NCURSESW_PKG_ERRORS" >&5 + + with_ncursesw=no + + + + + + + + + + + + + + +# Check whether --with-curses was given. +if test "${with_curses+set}" = set; then : + withval=$with_curses; +else + with_curses=auto +fi + + +case $with_curses in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES" >&5 +$as_echo_n "checking for CURSES... " >&6; } + +if test -n "$CURSES_CFLAGS"; then + pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_LIBS"; then + pkg_cv_CURSES_LIBS="$CURSES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` + else + CURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES" >&5 +$as_echo_n "checking for CURSES... " >&6; } + +if test -n "$CURSES_CFLAGS"; then + pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_LIBS"; then + pkg_cv_CURSES_LIBS="$CURSES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` + else + CURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PKG_ERRORS" >&5 + + with_curses=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_curses=no + : +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_curses=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_curses" = "yes"; then + HAVE_CURSES_TRUE= + HAVE_CURSES_FALSE='#' +else + HAVE_CURSES_TRUE='#' + HAVE_CURSES_FALSE= +fi + +if test "$with_curses" = "yes"; then : + +$as_echo "#define HAVE_CURSES 1" >>confdefs.h + +fi + + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_ncursesw=no + + + + + + + + + + + + + + +# Check whether --with-curses was given. +if test "${with_curses+set}" = set; then : + withval=$with_curses; +else + with_curses=auto +fi + + +case $with_curses in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES" >&5 +$as_echo_n "checking for CURSES... " >&6; } + +if test -n "$CURSES_CFLAGS"; then + pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_LIBS"; then + pkg_cv_CURSES_LIBS="$CURSES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` + else + CURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES" >&5 +$as_echo_n "checking for CURSES... " >&6; } + +if test -n "$CURSES_CFLAGS"; then + pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_LIBS"; then + pkg_cv_CURSES_LIBS="$CURSES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 + ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` + else + CURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PKG_ERRORS" >&5 + + with_curses=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_curses=no + : +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_curses=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_curses" = "yes"; then + HAVE_CURSES_TRUE= + HAVE_CURSES_FALSE='#' +else + HAVE_CURSES_TRUE='#' + HAVE_CURSES_FALSE= +fi + +if test "$with_curses" = "yes"; then : + +$as_echo "#define HAVE_CURSES 1" >>confdefs.h + +fi + + +else + NCURSESW_CFLAGS=$pkg_cv_NCURSESW_CFLAGS + NCURSESW_LIBS=$pkg_cv_NCURSESW_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_ncursesw=yes + + if true; then + HAVE_CURSES_TRUE= + HAVE_CURSES_FALSE='#' +else + HAVE_CURSES_TRUE='#' + HAVE_CURSES_FALSE= +fi + + +fi ;; #( + *) : + ;; +esac + + + + + + + + + + + + + + + + + + + +# Check whether --with-curses_panel was given. +if test "${with_curses_panel+set}" = set; then : + withval=$with_curses_panel; +else + with_curses_panel=auto +fi + + +case $with_curses_panel in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES_PANEL" >&5 +$as_echo_n "checking for CURSES_PANEL... " >&6; } + +if test -n "$CURSES_PANEL_CFLAGS"; then + pkg_cv_CURSES_PANEL_CFLAGS="$CURSES_PANEL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"panel\""; } >&5 + ($PKG_CONFIG --exists --print-errors "panel") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_PANEL_CFLAGS=`$PKG_CONFIG --cflags "panel" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_PANEL_LIBS"; then + pkg_cv_CURSES_PANEL_LIBS="$CURSES_PANEL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"panel\""; } >&5 + ($PKG_CONFIG --exists --print-errors "panel") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_PANEL_LIBS=`$PKG_CONFIG --libs "panel" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PANEL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "panel" 2>&1` + else + CURSES_PANEL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "panel" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PANEL_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + CURSES_PANEL_CFLAGS=$pkg_cv_CURSES_PANEL_CFLAGS + CURSES_PANEL_LIBS=$pkg_cv_CURSES_PANEL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURSES_PANEL" >&5 +$as_echo_n "checking for CURSES_PANEL... " >&6; } + +if test -n "$CURSES_PANEL_CFLAGS"; then + pkg_cv_CURSES_PANEL_CFLAGS="$CURSES_PANEL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"panel\""; } >&5 + ($PKG_CONFIG --exists --print-errors "panel") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_PANEL_CFLAGS=`$PKG_CONFIG --cflags "panel" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CURSES_PANEL_LIBS"; then + pkg_cv_CURSES_PANEL_LIBS="$CURSES_PANEL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"panel\""; } >&5 + ($PKG_CONFIG --exists --print-errors "panel") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CURSES_PANEL_LIBS=`$PKG_CONFIG --libs "panel" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CURSES_PANEL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "panel" 2>&1` + else + CURSES_PANEL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "panel" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURSES_PANEL_PKG_ERRORS" >&5 + + with_curses_panel=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_curses_panel=no + : +else + CURSES_PANEL_CFLAGS=$pkg_cv_CURSES_PANEL_CFLAGS + CURSES_PANEL_LIBS=$pkg_cv_CURSES_PANEL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_curses_panel=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_curses_panel" = "yes"; then + HAVE_CURSES_PANEL_TRUE= + HAVE_CURSES_PANEL_FALSE='#' +else + HAVE_CURSES_PANEL_TRUE='#' + HAVE_CURSES_PANEL_FALSE= +fi + +if test "$with_curses_panel" = "yes"; then : + +$as_echo "#define HAVE_CURSES_PANEL 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-sqlite3 was given. +if test "${with_sqlite3+set}" = set; then : + withval=$with_sqlite3; +else + with_sqlite3=auto +fi + + +case $with_sqlite3 in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLITE3" >&5 +$as_echo_n "checking for SQLITE3... " >&6; } + +if test -n "$SQLITE3_CFLAGS"; then + pkg_cv_SQLITE3_CFLAGS="$SQLITE3_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SQLITE3_CFLAGS=`$PKG_CONFIG --cflags "sqlite3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SQLITE3_LIBS"; then + pkg_cv_SQLITE3_LIBS="$SQLITE3_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SQLITE3_LIBS=`$PKG_CONFIG --libs "sqlite3" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + SQLITE3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sqlite3" 2>&1` + else + SQLITE3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sqlite3" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SQLITE3_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + SQLITE3_CFLAGS=$pkg_cv_SQLITE3_CFLAGS + SQLITE3_LIBS=$pkg_cv_SQLITE3_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLITE3" >&5 +$as_echo_n "checking for SQLITE3... " >&6; } + +if test -n "$SQLITE3_CFLAGS"; then + pkg_cv_SQLITE3_CFLAGS="$SQLITE3_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SQLITE3_CFLAGS=`$PKG_CONFIG --cflags "sqlite3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SQLITE3_LIBS"; then + pkg_cv_SQLITE3_LIBS="$SQLITE3_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SQLITE3_LIBS=`$PKG_CONFIG --libs "sqlite3" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + SQLITE3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sqlite3" 2>&1` + else + SQLITE3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sqlite3" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SQLITE3_PKG_ERRORS" >&5 + + with_sqlite3=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_sqlite3=no + : +else + SQLITE3_CFLAGS=$pkg_cv_SQLITE3_CFLAGS + SQLITE3_LIBS=$pkg_cv_SQLITE3_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_sqlite3=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_sqlite3" = "yes"; then + HAVE_SQLITE3_TRUE= + HAVE_SQLITE3_FALSE='#' +else + HAVE_SQLITE3_TRUE='#' + HAVE_SQLITE3_FALSE= +fi + +if test "$with_sqlite3" = "yes"; then : + +$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then : + withval=$with_zlib; +else + with_zlib=auto +fi + + +case $with_zlib in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5 +$as_echo_n "checking for ZLIB... " >&6; } + +if test -n "$ZLIB_CFLAGS"; then + pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 + ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 + ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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" 2>&1` + else + ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$ZLIB_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS + ZLIB_LIBS=$pkg_cv_ZLIB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5 +$as_echo_n "checking for ZLIB... " >&6; } + +if test -n "$ZLIB_CFLAGS"; then + pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 + ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 + ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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" 2>&1` + else + ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$ZLIB_PKG_ERRORS" >&5 + + with_zlib=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_zlib=no + : +else + ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS + ZLIB_LIBS=$pkg_cv_ZLIB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_zlib=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_zlib" = "yes"; then + HAVE_ZLIB_TRUE= + HAVE_ZLIB_FALSE='#' +else + HAVE_ZLIB_TRUE='#' + HAVE_ZLIB_FALSE= +fi + +if test "$with_zlib" = "yes"; then : + +$as_echo "#define HAVE_ZLIB 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-bz2 was given. +if test "${with_bz2+set}" = set; then : + withval=$with_bz2; +else + with_bz2=auto +fi + + +case $with_bz2 in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2" >&5 +$as_echo_n "checking for BZ2... " >&6; } + +if test -n "$BZ2_CFLAGS"; then + pkg_cv_BZ2_CFLAGS="$BZ2_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_BZ2_CFLAGS=`$PKG_CONFIG --cflags "bzip2" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$BZ2_LIBS"; then + pkg_cv_BZ2_LIBS="$BZ2_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_BZ2_LIBS=`$PKG_CONFIG --libs "bzip2" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + BZ2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "bzip2" 2>&1` + else + BZ2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "bzip2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$BZ2_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + BZ2_CFLAGS=$pkg_cv_BZ2_CFLAGS + BZ2_LIBS=$pkg_cv_BZ2_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2" >&5 +$as_echo_n "checking for BZ2... " >&6; } + +if test -n "$BZ2_CFLAGS"; then + pkg_cv_BZ2_CFLAGS="$BZ2_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_BZ2_CFLAGS=`$PKG_CONFIG --cflags "bzip2" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$BZ2_LIBS"; then + pkg_cv_BZ2_LIBS="$BZ2_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_BZ2_LIBS=`$PKG_CONFIG --libs "bzip2" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + BZ2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "bzip2" 2>&1` + else + BZ2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "bzip2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$BZ2_PKG_ERRORS" >&5 + + with_bz2=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_bz2=no + : +else + BZ2_CFLAGS=$pkg_cv_BZ2_CFLAGS + BZ2_LIBS=$pkg_cv_BZ2_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_bz2=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_bz2" = "yes"; then + HAVE_BZ2_TRUE= + HAVE_BZ2_FALSE='#' +else + HAVE_BZ2_TRUE='#' + HAVE_BZ2_FALSE= +fi + +if test "$with_bz2" = "yes"; then : + +$as_echo "#define HAVE_BZ2 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-lzma was given. +if test "${with_lzma+set}" = set; then : + withval=$with_lzma; +else + with_lzma=auto +fi + + +case $with_lzma in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZMA" >&5 +$as_echo_n "checking for LZMA... " >&6; } + +if test -n "$LZMA_CFLAGS"; then + pkg_cv_LZMA_CFLAGS="$LZMA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 + ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LZMA_LIBS"; then + pkg_cv_LZMA_LIBS="$LZMA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 + ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + LZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1` + else + LZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LZMA_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + LZMA_CFLAGS=$pkg_cv_LZMA_CFLAGS + LZMA_LIBS=$pkg_cv_LZMA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZMA" >&5 +$as_echo_n "checking for LZMA... " >&6; } + +if test -n "$LZMA_CFLAGS"; then + pkg_cv_LZMA_CFLAGS="$LZMA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 + ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LZMA_LIBS"; then + pkg_cv_LZMA_LIBS="$LZMA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 + ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + LZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1` + else + LZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LZMA_PKG_ERRORS" >&5 + + with_lzma=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_lzma=no + : +else + LZMA_CFLAGS=$pkg_cv_LZMA_CFLAGS + LZMA_LIBS=$pkg_cv_LZMA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_lzma=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_lzma" = "yes"; then + HAVE_LZMA_TRUE= + HAVE_LZMA_FALSE='#' +else + HAVE_LZMA_TRUE='#' + HAVE_LZMA_FALSE= +fi + +if test "$with_lzma" = "yes"; then : + +$as_echo "#define HAVE_LZMA 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-expat was given. +if test "${with_expat+set}" = set; then : + withval=$with_expat; +else + with_expat=auto +fi + + +case $with_expat in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPAT" >&5 +$as_echo_n "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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"expat\""; } >&5 + ($PKG_CONFIG --exists --print-errors "expat") 2>&5 + ac_status=$? + $as_echo "$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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"expat\""; } >&5 + ($PKG_CONFIG --exists --print-errors "expat") 2>&5 + ac_status=$? + $as_echo "$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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + EXPAT_CFLAGS=$pkg_cv_EXPAT_CFLAGS + EXPAT_LIBS=$pkg_cv_EXPAT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPAT" >&5 +$as_echo_n "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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"expat\""; } >&5 + ($PKG_CONFIG --exists --print-errors "expat") 2>&5 + ac_status=$? + $as_echo "$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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"expat\""; } >&5 + ($PKG_CONFIG --exists --print-errors "expat") 2>&5 + ac_status=$? + $as_echo "$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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + + with_expat=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_expat=no + : +else + EXPAT_CFLAGS=$pkg_cv_EXPAT_CFLAGS + EXPAT_LIBS=$pkg_cv_EXPAT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_expat=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_expat" = "yes"; then + HAVE_EXPAT_TRUE= + HAVE_EXPAT_FALSE='#' +else + HAVE_EXPAT_TRUE='#' + HAVE_EXPAT_FALSE= +fi + +if test "$with_expat" = "yes"; then : + +$as_echo "#define HAVE_EXPAT 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-uuid was given. +if test "${with_uuid+set}" = set; then : + withval=$with_uuid; +else + with_uuid=auto +fi + + +case $with_uuid in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5 +$as_echo_n "checking for UUID... " >&6; } + +if test -n "$UUID_CFLAGS"; then + pkg_cv_UUID_CFLAGS="$UUID_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 + ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_UUID_CFLAGS=`$PKG_CONFIG --cflags "uuid" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$UUID_LIBS"; then + pkg_cv_UUID_LIBS="$UUID_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 + ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_UUID_LIBS=`$PKG_CONFIG --libs "uuid" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + UUID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "uuid" 2>&1` + else + UUID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "uuid" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$UUID_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + UUID_CFLAGS=$pkg_cv_UUID_CFLAGS + UUID_LIBS=$pkg_cv_UUID_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5 +$as_echo_n "checking for UUID... " >&6; } + +if test -n "$UUID_CFLAGS"; then + pkg_cv_UUID_CFLAGS="$UUID_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 + ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_UUID_CFLAGS=`$PKG_CONFIG --cflags "uuid" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$UUID_LIBS"; then + pkg_cv_UUID_LIBS="$UUID_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 + ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_UUID_LIBS=`$PKG_CONFIG --libs "uuid" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + UUID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "uuid" 2>&1` + else + UUID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "uuid" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$UUID_PKG_ERRORS" >&5 + + with_uuid=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_uuid=no + : +else + UUID_CFLAGS=$pkg_cv_UUID_CFLAGS + UUID_LIBS=$pkg_cv_UUID_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_uuid=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_uuid" = "yes"; then + HAVE_UUID_TRUE= + HAVE_UUID_FALSE='#' +else + HAVE_UUID_TRUE='#' + HAVE_UUID_FALSE= +fi + +if test "$with_uuid" = "yes"; then : + +$as_echo "#define HAVE_UUID 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-ffi was given. +if test "${with_ffi+set}" = set; then : + withval=$with_ffi; +else + with_ffi=auto +fi + + +case $with_ffi in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFI" >&5 +$as_echo_n "checking for FFI... " >&6; } + +if test -n "$FFI_CFLAGS"; then + pkg_cv_FFI_CFLAGS="$FFI_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_FFI_LIBS=`$PKG_CONFIG --libs "libffi" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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" 2>&1` + else + FFI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libffi" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFI_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + FFI_CFLAGS=$pkg_cv_FFI_CFLAGS + FFI_LIBS=$pkg_cv_FFI_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFI" >&5 +$as_echo_n "checking for FFI... " >&6; } + +if test -n "$FFI_CFLAGS"; then + pkg_cv_FFI_CFLAGS="$FFI_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_FFI_LIBS=`$PKG_CONFIG --libs "libffi" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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" 2>&1` + else + FFI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libffi" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFI_PKG_ERRORS" >&5 + + with_ffi=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_ffi=no + : +else + FFI_CFLAGS=$pkg_cv_FFI_CFLAGS + FFI_LIBS=$pkg_cv_FFI_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_ffi=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_ffi" = "yes"; then + HAVE_FFI_TRUE= + HAVE_FFI_FALSE='#' +else + HAVE_FFI_TRUE='#' + HAVE_FFI_FALSE= +fi + +if test "$with_ffi" = "yes"; then : + +$as_echo "#define HAVE_FFI 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-nis was given. +if test "${with_nis+set}" = set; then : + withval=$with_nis; +else + with_nis=auto +fi + + +case $with_nis in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NIS" >&5 +$as_echo_n "checking for NIS... " >&6; } + +if test -n "$NIS_CFLAGS"; then + pkg_cv_NIS_CFLAGS="$NIS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnsl libtirpc\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnsl libtirpc") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NIS_CFLAGS=`$PKG_CONFIG --cflags "libnsl libtirpc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$NIS_LIBS"; then + pkg_cv_NIS_LIBS="$NIS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnsl libtirpc\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnsl libtirpc") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NIS_LIBS=`$PKG_CONFIG --libs "libnsl libtirpc" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + NIS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnsl libtirpc" 2>&1` + else + NIS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnsl libtirpc" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$NIS_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + NIS_CFLAGS=$pkg_cv_NIS_CFLAGS + NIS_LIBS=$pkg_cv_NIS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NIS" >&5 +$as_echo_n "checking for NIS... " >&6; } + +if test -n "$NIS_CFLAGS"; then + pkg_cv_NIS_CFLAGS="$NIS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnsl libtirpc\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnsl libtirpc") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NIS_CFLAGS=`$PKG_CONFIG --cflags "libnsl libtirpc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$NIS_LIBS"; then + pkg_cv_NIS_LIBS="$NIS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnsl libtirpc\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnsl libtirpc") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NIS_LIBS=`$PKG_CONFIG --libs "libnsl libtirpc" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + NIS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnsl libtirpc" 2>&1` + else + NIS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnsl libtirpc" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$NIS_PKG_ERRORS" >&5 + + with_nis=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_nis=no + : +else + NIS_CFLAGS=$pkg_cv_NIS_CFLAGS + NIS_LIBS=$pkg_cv_NIS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_nis=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_nis" = "yes"; then + HAVE_NIS_TRUE= + HAVE_NIS_FALSE='#' +else + HAVE_NIS_TRUE='#' + HAVE_NIS_FALSE= +fi + +if test "$with_nis" = "yes"; then : + +$as_echo "#define HAVE_NIS 1" >>confdefs.h + +fi + + + + + + + + + + + + + + +# Check whether --with-crypt was given. +if test "${with_crypt+set}" = set; then : + withval=$with_crypt; +else + with_crypt=auto +fi + + +case $with_crypt in #( + yes) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPT" >&5 +$as_echo_n "checking for CRYPT... " >&6; } + +if test -n "$CRYPT_CFLAGS"; then + pkg_cv_CRYPT_CFLAGS="$CRYPT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcrypt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CRYPT_CFLAGS=`$PKG_CONFIG --cflags "libcrypt" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CRYPT_LIBS"; then + pkg_cv_CRYPT_LIBS="$CRYPT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcrypt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CRYPT_LIBS=`$PKG_CONFIG --libs "libcrypt" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CRYPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcrypt" 2>&1` + else + CRYPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcrypt" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CRYPT_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + CRYPT_CFLAGS=$pkg_cv_CRYPT_CFLAGS + CRYPT_LIBS=$pkg_cv_CRYPT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi ;; #( + auto) : + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPT" >&5 +$as_echo_n "checking for CRYPT... " >&6; } + +if test -n "$CRYPT_CFLAGS"; then + pkg_cv_CRYPT_CFLAGS="$CRYPT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcrypt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CRYPT_CFLAGS=`$PKG_CONFIG --cflags "libcrypt" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CRYPT_LIBS"; then + pkg_cv_CRYPT_LIBS="$CRYPT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcrypt") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CRYPT_LIBS=`$PKG_CONFIG --libs "libcrypt" 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 + CRYPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcrypt" 2>&1` + else + CRYPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcrypt" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CRYPT_PKG_ERRORS" >&5 + + with_crypt=no + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_crypt=no + : +else + CRYPT_CFLAGS=$pkg_cv_CRYPT_CFLAGS + CRYPT_LIBS=$pkg_cv_CRYPT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_crypt=yes + +fi ;; #( + *) : + ;; +esac + + + + + + + if test "$with_crypt" = "yes"; then + HAVE_CRYPT_TRUE= + HAVE_CRYPT_FALSE='#' +else + HAVE_CRYPT_TRUE='#' + HAVE_CRYPT_FALSE= +fi + +if test "$with_crypt" = "yes"; then : + +$as_echo "#define HAVE_CRYPT 1" >>confdefs.h + +fi + +# detected manually +# PKG_WITH_MODULES_OPTIONAL([TK], [tcl tk]) + + if test "$ac_sys_system" = "Darwin"; then + HAVE_SCPROXY_TRUE= + HAVE_SCPROXY_FALSE='#' +else + HAVE_SCPROXY_TRUE='#' + HAVE_SCPROXY_FALSE= +fi + + +# Check for usable OpenSSL + + found=false + +# Check whether --with-openssl was given. +if test "${with_openssl+set}" = set; then : + withval=$with_openssl; + case "$withval" in + "" | y | ye | yes | n | no) + as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5 + ;; + *) ssldirs="$withval" + ;; + esac + +else + + # if pkg-config is installed and openssl has installed a .pc file, + # then use that information and don't search ssldirs + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PKG_CONFIG"; then + ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + 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_PKG_CONFIG="${ac_tool_prefix}pkg-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PKG_CONFIG=$ac_cv_prog_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_PKG_CONFIG"; then + ac_ct_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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_PKG_CONFIG"; then + ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + 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_PKG_CONFIG="pkg-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG +if test -n "$ac_ct_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 +$as_echo "$ac_ct_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_ct_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_prog_PKG_CONFIG" +fi + + if test x"$PKG_CONFIG" != x""; then + OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null` + if test $? = 0; then + OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null` + OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null` + found=true + fi + fi + + # no such luck; use some default ssldirs + if ! $found; then + ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr" + fi + + +fi + + + + # note that we #include , so the OpenSSL headers have to be in + # an 'openssl' subdirectory + + if ! $found; then + OPENSSL_INCLUDES= + for ssldir in $ssldirs; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5 +$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; } + if test -f "$ssldir/include/openssl/ssl.h"; then + OPENSSL_INCLUDES="-I$ssldir/include" + OPENSSL_LDFLAGS="-L$ssldir/lib" + OPENSSL_LIBS="-lssl -lcrypto" + found=true + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + break + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + done + + # if the file wasn't found, well, go ahead and try the link anyway -- maybe + # it will just work! + fi + + # try the preprocessor and linker with our new flags, + # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5 +$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; } + echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \ + "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5 + + save_LIBS="$LIBS" + save_LDFLAGS="$LDFLAGS" + save_CPPFLAGS="$CPPFLAGS" + LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" + LIBS="$OPENSSL_LIBS $LIBS" + CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +SSL_new(NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_openssl=yes + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_openssl=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + + + + + + +# rpath to libssl and libcrypto +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5 +$as_echo_n "checking for --with-openssl-rpath... " >&6; } + +# Check whether --with-openssl-rpath was given. +if test "${with_openssl_rpath+set}" = set; then : withval=$with_openssl_rpath; else with_openssl_rpath=no @@ -18015,14 +21172,22 @@ EVP_PBE_scrypt(NULL, 0, NULL, 0, 2, 8, 1, 0, NULL, 0); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + have_working_openssl=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + have_working_openssl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_working_openssl" >&5 +$as_echo "$have_working_openssl" >&6; } + if test $have_working_openssl = yes; then + HAVE_OPENSSL_TRUE= + HAVE_OPENSSL_FALSE='#' +else + HAVE_OPENSSL_TRUE='#' + HAVE_OPENSSL_FALSE= +fi + LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" LDFLAGS="$save_LDFLAGS" @@ -18184,9 +21349,8 @@ $as_echo "no" >&6; } fi - # generate output files -ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh" +ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh Modules/Setup" ac_config_files="$ac_config_files Modules/ld_so_aix" @@ -18299,7 +21463,91 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +if test -z "${HAVE_TCLTK_TRUE}" && test -z "${HAVE_TCLTK_FALSE}"; then + as_fn_error $? "conditional \"HAVE_TCLTK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_DBM_TRUE}" && test -z "${HAVE_DBM_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DBM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_GDBM_TRUE}" && test -z "${HAVE_GDBM_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GDBM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_READLINE_TRUE}" && test -z "${HAVE_READLINE_FALSE}"; then + as_fn_error $? "conditional \"HAVE_READLINE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_CURSES_TRUE}" && test -z "${HAVE_CURSES_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CURSES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_CURSES_TRUE}" && test -z "${HAVE_CURSES_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CURSES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_CURSES_TRUE}" && test -z "${HAVE_CURSES_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CURSES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_CURSES_TRUE}" && test -z "${HAVE_CURSES_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CURSES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_CURSES_TRUE}" && test -z "${HAVE_CURSES_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CURSES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_CURSES_PANEL_TRUE}" && test -z "${HAVE_CURSES_PANEL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CURSES_PANEL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SQLITE3_TRUE}" && test -z "${HAVE_SQLITE3_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SQLITE3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_ZLIB_TRUE}" && test -z "${HAVE_ZLIB_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ZLIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_BZ2_TRUE}" && test -z "${HAVE_BZ2_FALSE}"; then + as_fn_error $? "conditional \"HAVE_BZ2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LZMA_TRUE}" && test -z "${HAVE_LZMA_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LZMA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_EXPAT_TRUE}" && test -z "${HAVE_EXPAT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_EXPAT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_UUID_TRUE}" && test -z "${HAVE_UUID_FALSE}"; then + as_fn_error $? "conditional \"HAVE_UUID\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_FFI_TRUE}" && test -z "${HAVE_FFI_FALSE}"; then + as_fn_error $? "conditional \"HAVE_FFI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_NIS_TRUE}" && test -z "${HAVE_NIS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_NIS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_CRYPT_TRUE}" && test -z "${HAVE_CRYPT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CRYPT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SCPROXY_TRUE}" && test -z "${HAVE_SCPROXY_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SCPROXY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_OPENSSL_TRUE}" && test -z "${HAVE_OPENSSL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_OPENSSL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -18891,6 +22139,7 @@ do "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;; + "Modules/Setup") CONFIG_FILES="$CONFIG_FILES Modules/Setup" ;; "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; diff --git a/configure.ac b/configure.ac index 5674093fe67a40..734cba5f799aa9 100644 --- a/configure.ac +++ b/configure.ac @@ -3231,6 +3231,8 @@ else TCLTK_LIBS="$with_tcltk_libs" fi +AM_CONDITIONAL([HAVE_TCLTK], [test -n "$TCLTK_LIBS"]) + # Check for --with-dbmliborder AC_MSG_CHECKING(for --with-dbmliborder) AC_ARG_WITH(dbmliborder, @@ -3249,6 +3251,12 @@ else fi]) AC_MSG_RESULT($with_dbmliborder) +# TODO +AM_CONDITIONAL([HAVE_DBM], [false]) + +AC_CHECK_LIB(gdbm, gdbm_open, [have_gdbm=yes], [have_gdbm=no]) +AM_CONDITIONAL([HAVE_GDBM], [test $have_gdbm = yes]) + # Templates for things AC_DEFINEd more than once. # For a single AC_DEFINE, no template is needed. AH_TEMPLATE(_REENTRANT, @@ -5054,8 +5062,9 @@ if test "$with_readline" != no; then fi done - # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts - #AC_SUBST([READLINE_LIBS]) + AC_SUBST([READLINE_LIBS]) + AC_SUBST([READLINE_CFLAGS], [""]) + if test $py_cv_lib_readline = no; then AC_MSG_RESULT([none]) else @@ -5063,6 +5072,7 @@ if test "$with_readline" != no; then AC_DEFINE(HAVE_LIBREADLINE, 1, [Define to build the readline module.]) fi + AM_CONDITIONAL([HAVE_READLINE], [test $py_cv_lib_readline != no]) fi if test "$py_cv_lib_readline" = yes; then @@ -5636,7 +5646,23 @@ do done AC_SUBST(SRCDIRS) -SRCDIRS="Parser Objects Python Modules Modules/_io Programs" +SRCDIRS="\ + Modules \ + Modules/_blake2 \ + Modules/_ctypes \ + Modules/_decimal \ + Modules/_decimal/libmpdec \ + Modules/_io \ + Modules/_multiprocessing \ + Modules/_sha3 \ + Modules/_sqlite \ + Modules/_xxtestfuzz \ + Modules/cjkcodecs \ + Modules/expat \ + Objects \ + Parser \ + Programs \ + Python" AC_MSG_CHECKING(for build directories) for dir in $SRCDIRS; do if test ! -d $dir; then @@ -5882,6 +5908,53 @@ AC_CHECK_FUNCS([shm_open shm_unlink]) LIBS="$save_LIBS" ac_includes_default="$save_includes_default" +# PKG_WITH_MODULES_OPTIONAL( +# VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], +# [DESCRIPTION], [DEFAULT]) +# +# Like PKG_HAVE_DEFINE_WITH_MODULES() with optional module +# triggers AM_CONDITIONAL, AC_DEFINE, and exports as make var +# does not fail on error +AC_DEFUN([PKG_WITH_MODULES_OPTIONAL], +[ +PKG_WITH_MODULES([$1], [$2], [$3], [m4_default([$4], [:])], [$5], [$6]) +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +]) + +# detect dependencies for modules +# libraries without pkg-config .pc files: +# gdbm/ndbm, libmpdec (decmimal) + +# readline or editline are detected manually +#PKG_WITH_MODULES_OPTIONAL([READLINE], [readline], [], [ +# # fall back to libedit +# PKG_WITH_MODULES_OPTIONAL([READLINE], [libedit]) +#]) + +# define either ncursesw or curses +PKG_WITH_MODULES([NCURSESW], [ncursesw], [ + AM_CONDITIONAL(HAVE_CURSES, [true]) +], [ + PKG_WITH_MODULES_OPTIONAL([CURSES], [ncurses]) +]) +PKG_WITH_MODULES_OPTIONAL([CURSES_PANEL], [panel]) +PKG_WITH_MODULES_OPTIONAL([SQLITE3], [sqlite3]) +PKG_WITH_MODULES_OPTIONAL([ZLIB], [zlib]) +PKG_WITH_MODULES_OPTIONAL([BZ2], [bzip2]) +PKG_WITH_MODULES_OPTIONAL([LZMA], [liblzma]) +PKG_WITH_MODULES_OPTIONAL([EXPAT], [expat]) +PKG_WITH_MODULES_OPTIONAL([UUID], [uuid]) +PKG_WITH_MODULES_OPTIONAL([FFI], [libffi]) +PKG_WITH_MODULES_OPTIONAL([NIS], [libnsl libtirpc]) +PKG_WITH_MODULES_OPTIONAL([CRYPT], [libcrypt]) +# detected manually +# PKG_WITH_MODULES_OPTIONAL([TK], [tcl tk]) + +AM_CONDITIONAL([HAVE_SCPROXY], [test "$ac_sys_system" = "Darwin"]) + # Check for usable OpenSSL AX_CHECK_OPENSSL([have_openssl=yes],[have_openssl=no]) @@ -5945,8 +6018,10 @@ OBJ_nid2sn(NID_sha3_512); OBJ_nid2sn(NID_blake2b512); EVP_PBE_scrypt(NULL, 0, NULL, 0, 2, 8, 1, 0, NULL, 0); ]])], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) + [have_working_openssl=yes], + [have_working_openssl=no]) +AC_MSG_RESULT($have_working_openssl) +AM_CONDITIONAL([HAVE_OPENSSL], [test $have_working_openssl = yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" LDFLAGS="$save_LDFLAGS" @@ -6071,9 +6146,8 @@ else fi AC_SUBST(TEST_MODULES) - # generate output files -AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) +AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh Modules/Setup) AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) AC_OUTPUT diff --git a/pyconfig.h.in b/pyconfig.h.in index 3e3944a6ec208d..ff5c537a5924e3 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -124,6 +124,9 @@ /* Has builtin __atomic_load_n() and __atomic_store_n() functions */ #undef HAVE_BUILTIN_ATOMIC +/* Enable bz2 support */ +#undef HAVE_BZ2 + /* Define to 1 if you have the 'chflags' function. */ #undef HAVE_CHFLAGS @@ -163,6 +166,9 @@ /* Define to 1 if you have the `copy_file_range' function. */ #undef HAVE_COPY_FILE_RANGE +/* Enable crypt support */ +#undef HAVE_CRYPT + /* Define to 1 if you have the header file. */ #undef HAVE_CRYPT_H @@ -175,6 +181,9 @@ /* Define if you have the 'ctermid_r' function. */ #undef HAVE_CTERMID_R +/* Enable curses support */ +#undef HAVE_CURSES + /* Define if you have the 'filter' function. */ #undef HAVE_CURSES_FILTER @@ -193,6 +202,9 @@ /* Define if you have the 'is_term_resized' function. */ #undef HAVE_CURSES_IS_TERM_RESIZED +/* Enable curses_panel support */ +#undef HAVE_CURSES_PANEL + /* Define if you have the 'resizeterm' function. */ #undef HAVE_CURSES_RESIZETERM @@ -311,6 +323,9 @@ /* Define to 1 if you have the `execv' function. */ #undef HAVE_EXECV +/* Enable expat support */ +#undef HAVE_EXPAT + /* Define to 1 if you have the `explicit_bzero' function. */ #undef HAVE_EXPLICIT_BZERO @@ -353,6 +368,9 @@ /* Define to 1 if you have the `fexecve' function. */ #undef HAVE_FEXECVE +/* Enable ffi support */ +#undef HAVE_FFI + /* Define to 1 if you have the `flock' function. */ #undef HAVE_FLOCK @@ -667,6 +685,9 @@ /* Define to 1 if you have the `lutimes' function. */ #undef HAVE_LUTIMES +/* Enable lzma support */ +#undef HAVE_LZMA + /* Define to 1 if you have the `madvise' function. */ #undef HAVE_MADVISE @@ -727,6 +748,9 @@ /* Define to 1 if you have the `nice' function. */ #undef HAVE_NICE +/* Enable nis support */ +#undef HAVE_NIS + /* Define if the internal form of wchar_t in non-Unicode locales is not Unicode. */ #undef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION @@ -1010,6 +1034,9 @@ /* Define to 1 if you have the `splice' function. */ #undef HAVE_SPLICE +/* Enable sqlite3 support */ +#undef HAVE_SQLITE3 + /* Define if your compiler provides ssize_t */ #undef HAVE_SSIZE_T @@ -1284,6 +1311,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UTIME_H +/* Enable uuid support */ +#undef HAVE_UUID + /* Define if uuid_create() exists. */ #undef HAVE_UUID_CREATE @@ -1336,6 +1366,9 @@ /* Define to 1 if you have the `writev' function. */ #undef HAVE_WRITEV +/* Enable zlib support */ +#undef HAVE_ZLIB + /* Define if the zlib library has inflateCopy */ #undef HAVE_ZLIB_COPY diff --git a/setup.py b/setup.py index f32dd4c6e5e145..8215593ae57c12 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ import logging import os import re +import shlex import sys import sysconfig import warnings @@ -378,7 +379,9 @@ def __init__(self, dist): if '-j' in os.environ.get('MAKEFLAGS', ''): self.parallel = True - def add(self, ext): + def add(self, ext, *, update_flags=False): + if update_flags: + self.update_extension_flags(ext) self.extensions.append(ext) def set_srcdir(self): @@ -426,12 +429,23 @@ def update_sources_depends(self): # re-compile extensions if a header file has been changed ext.depends.extend(headers) - def remove_configured_extensions(self): + def update_extension_flags(self, ext): + name = ext.name.upper() + cflags = sysconfig.get_config_var(f"MODULE_{name}_CFLAGS") + if cflags: + ext.extra_compile_args.extend(shlex.split(cflags)) + ldflags = sysconfig.get_config_var(f"MODULE_{name}_LDFLAGS") + if ldflags: + ext.extra_link_args.extend(shlex.split(ldflags)) + return ext + + def handle_configured_extensions(self): # The sysconfig variables built by makesetup that list the already # built modules and the disabled modules as configured by the Setup # files. - sysconf_built = sysconfig.get_config_var('MODBUILT_NAMES').split() - sysconf_dis = sysconfig.get_config_var('MODDISABLED_NAMES').split() + sysconf_built = set(sysconfig.get_config_var('MODBUILT_NAMES').split()) + sysconf_shared = set(sysconfig.get_config_var('MODSHARED_NAMES').split()) + sysconf_dis = set(sysconfig.get_config_var('MODDISABLED_NAMES').split()) mods_built = [] mods_disabled = [] @@ -449,11 +463,15 @@ def remove_configured_extensions(self): mods_configured] # Remove the shared libraries built by a previous build. for ext in mods_configured: + # Don't remove shared extensions which have been built + # by Modules/Setup + if ext.name in sysconf_shared: + continue fullpath = self.get_ext_fullpath(ext.name) - if os.path.exists(fullpath): + if os.path.lexists(fullpath): os.unlink(fullpath) - return (mods_built, mods_disabled) + return mods_built, mods_disabled def set_compiler_executables(self): # When you run "make CC=altcc" or something similar, you really want @@ -478,7 +496,7 @@ def build_extensions(self): self.remove_disabled() self.update_sources_depends() - mods_built, mods_disabled = self.remove_configured_extensions() + mods_built, mods_disabled = self.handle_configured_extensions() self.set_compiler_executables() if LIST_MODULE_NAMES: @@ -2447,9 +2465,9 @@ def split_var(name, sep): runtime_library_dirs = [openssl_rpath] openssl_extension_kwargs = dict( - include_dirs=openssl_includes, - library_dirs=openssl_libdirs, - libraries=openssl_libs, + # include_dirs=openssl_includes, + # library_dirs=openssl_libdirs, + # libraries=openssl_libs, runtime_library_dirs=runtime_library_dirs, ) @@ -2484,7 +2502,7 @@ def split_var(name, sep): '_ssl/cert.c', ], **openssl_extension_kwargs - ) + ), update_flags=True ) self.add( Extension( @@ -2492,7 +2510,7 @@ def split_var(name, sep): ['_hashopenssl.c'], depends=['hashlib.h'], **openssl_extension_kwargs, - ) + ), update_flags=True ) def detect_hash_builtins(self):