diff options
author | Andres Freund <andres@anarazel.de> | 2025-03-18 14:40:05 -0400 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2025-03-26 19:45:32 -0400 |
commit | 8eadd5c73c44708ecd45b9fd3ac54a550511d16f (patch) | |
tree | 45074275a931018bf5854dcae95b64a22ee16da0 /configure | |
parent | f056f75dafd0025d26efaca026a87f14c079a130 (diff) | |
download | postgresql-8eadd5c73c44708ecd45b9fd3ac54a550511d16f.tar.gz postgresql-8eadd5c73c44708ecd45b9fd3ac54a550511d16f.zip |
aio: Add liburing dependency
Will be used in a subsequent commit, to implement io_method=io_uring. Kept
separate for easier review.
Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/configure b/configure index fac1e9a4e39..c6d762dc999 100755 --- a/configure +++ b/configure @@ -712,6 +712,9 @@ LIBCURL_LIBS LIBCURL_CFLAGS with_libcurl with_uuid +LIBURING_LIBS +LIBURING_CFLAGS +with_liburing with_readline with_systemd with_selinux @@ -865,6 +868,7 @@ with_selinux with_systemd with_readline with_libedit_preferred +with_liburing with_uuid with_ossp_uuid with_libcurl @@ -898,6 +902,8 @@ PKG_CONFIG_PATH PKG_CONFIG_LIBDIR ICU_CFLAGS ICU_LIBS +LIBURING_CFLAGS +LIBURING_LIBS LIBCURL_CFLAGS LIBCURL_LIBS XML2_CONFIG @@ -1578,6 +1584,7 @@ Optional Packages: --without-readline do not use GNU Readline nor BSD Libedit for editing --with-libedit-preferred prefer BSD Libedit over GNU Readline + --with-liburing build with io_uring support, for asynchronous I/O --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp) --with-ossp-uuid obsolete spelling of --with-uuid=ossp --with-libcurl build with libcurl support @@ -1614,6 +1621,10 @@ Some influential environment variables: path overriding pkg-config's built-in search path ICU_CFLAGS C compiler flags for ICU, overriding pkg-config ICU_LIBS linker flags for ICU, overriding pkg-config + LIBURING_CFLAGS + C compiler flags for LIBURING, overriding pkg-config + LIBURING_LIBS + linker flags for LIBURING, overriding pkg-config LIBCURL_CFLAGS C compiler flags for LIBCURL, overriding pkg-config LIBCURL_LIBS @@ -8692,6 +8703,134 @@ fi +# +# liburing +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with liburing support" >&5 +$as_echo_n "checking whether to build with liburing support... " >&6; } + + + +# Check whether --with-liburing was given. +if test "${with_liburing+set}" = set; then : + withval=$with_liburing; + case $withval in + yes) + +$as_echo "#define USE_LIBURING 1" >>confdefs.h + + ;; + no) + : + ;; + *) + as_fn_error $? "no argument expected for --with-liburing option" "$LINENO" 5 + ;; + esac + +else + with_liburing=no + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_liburing" >&5 +$as_echo "$with_liburing" >&6; } + + +if test "$with_liburing" = yes; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for liburing" >&5 +$as_echo_n "checking for liburing... " >&6; } + +if test -n "$LIBURING_CFLAGS"; then + pkg_cv_LIBURING_CFLAGS="$LIBURING_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liburing\""; } >&5 + ($PKG_CONFIG --exists --print-errors "liburing") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBURING_CFLAGS=`$PKG_CONFIG --cflags "liburing" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBURING_LIBS"; then + pkg_cv_LIBURING_LIBS="$LIBURING_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liburing\""; } >&5 + ($PKG_CONFIG --exists --print-errors "liburing") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBURING_LIBS=`$PKG_CONFIG --libs "liburing" 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 + LIBURING_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liburing" 2>&1` + else + LIBURING_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liburing" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBURING_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (liburing) were not met: + +$LIBURING_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBURING_CFLAGS +and LIBURING_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBURING_CFLAGS +and LIBURING_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } +else + LIBURING_CFLAGS=$pkg_cv_LIBURING_CFLAGS + LIBURING_LIBS=$pkg_cv_LIBURING_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +fi # # UUID library |