patch 9.1.1560: configure: uses $PKG_CONFIG before it is defined Commit: https://github.com/vim/vim/commit/861dade4e3db61f70e8fdd18a3b5a0635be08b16 Author: Christoffer Aasted <chr.aas...@gmail.com> Date: Thu Jul 17 21:05:59 2025 +0200
patch 9.1.1560: configure: uses $PKG_CONFIG before it is defined Problem: configure: uses $PKG_CONFIG before it is defined Solution: Define $PKG_CONFIG earlier in the script (Christoffer Aasted). closes: #17771 Signed-off-by: Christoffer Aasted <chr.aas...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/auto/configure b/src/auto/configure index b72d4edca..a4123a3fd 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -668,7 +668,6 @@ GNOME_LIBS GTK_LIBNAME GTK_LIBS GTK_CFLAGS -PKG_CONFIG X_LIB X_EXTRA_LIBS X_LIBS @@ -755,6 +754,7 @@ XCODE_SELECT CPP_MM CROSS_COMPILING BUILD_DATE_MSG +PKG_CONFIG STRIP AWK FGREP @@ -4526,6 +4526,119 @@ printf "%s " "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi +if test -z "$PKG_CONFIG"; then + 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 +{ printf "%s " "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $PKG_CONFIG in + [\/]* | ?:[\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s " "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { printf "%s " "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s " "$PKG_CONFIG" >&6; } +else + { printf "%s " "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s " "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_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 +{ printf "%s " "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $ac_pt_PKG_CONFIG in + [\/]* | ?:[\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s " "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { printf "%s " "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s " "$ac_pt_PKG_CONFIG" >&6; } +else + { printf "%s " "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s " "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s " "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s " "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi + if test x"$ac_cv_prog_cc_c99" != xno; then @@ -10573,119 +10686,6 @@ fi -if test -z "$PKG_CONFIG"; then - 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 -{ printf "%s " "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) case $PKG_CONFIG in - [\/]* | ?:[\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s " "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { printf "%s " "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -printf "%s " "$PKG_CONFIG" >&6; } -else - { printf "%s " "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s " "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_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 -{ printf "%s " "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) case $ac_pt_PKG_CONFIG in - [\/]* | ?:[\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s " "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { printf "%s " "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -printf "%s " "$ac_pt_PKG_CONFIG" >&6; } -else - { printf "%s " "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s " "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="no" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s " "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s " "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi - if test -z "$SKIP_GTK3"; then { printf "%s " "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5 printf %s "checking --disable-gtktest argument... " >&6; } diff --git a/src/configure.ac b/src/configure.ac index 62f6bbb70..9db7d37bd 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -25,6 +25,10 @@ AC_EXEEXT AC_HEADER_SYS_WAIT +if test -z "$PKG_CONFIG"; then + AC_PATH_TOOL(PKG_CONFIG, pkg-config, no) +fi + dnl Check that the C99 features that Vim uses are supported: if test x"$ac_cv_prog_cc_c99" != xno; then dnl If the compiler doesn't explicitly support C99, then check @@ -2885,10 +2889,6 @@ AC_DEFUN([GNOME_INIT],[ GNOME_INIT_HOOK([],fail) ]) -if test -z "$PKG_CONFIG"; then - AC_PATH_TOOL(PKG_CONFIG, pkg-config, no) -fi - dnl --------------------------------------------------------------------------- dnl Check for GTK3. If it succeeds, skip the check for GTK2. dnl --------------------------------------------------------------------------- diff --git a/src/version.c b/src/version.c index f61d39ced..31443f916 100644 --- a/src/version.c +++ b/src/version.c @@ -719,6 +719,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1560, /**/ 1559, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1ucU4O-00BhBe-A4%40256bit.org.