diff --git a/ChangeLog b/ChangeLog index 689cd88ca..2b786c762 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * Source/NSThread.m: Improve exception message when performing a selector on a finished thread. + * configure.ac: Fix for older versions of pkg-config + * configure: regenerate 2018-01-14 Yavor Doganov diff --git a/configure b/configure index e9c77b0a7..9fb74989c 100755 --- a/configure +++ b/configure @@ -715,6 +715,7 @@ ac_cv_sizeof_short GS_UINT8 GS_SINT8 GS_WORDS_BIGENDIAN +PKG_CONFIG WHOAMI EGREP GREP @@ -5789,6 +5790,51 @@ fi PKG_PROG_PKG_CONFIG +# If the modern mechanism failswe may havew an older pkg-config +# so try looking it up the old fashioned way. +if test -z "$PKG_CONFIG"; then + # 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_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 + 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $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 + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_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 + #-------------------------------------------------------------------- # specific target_os options diff --git a/configure.ac b/configure.ac index dc2497134..b088bdd79 100644 --- a/configure.ac +++ b/configure.ac @@ -1211,6 +1211,12 @@ AC_LANG_POP(C) AC_PATH_PROG(WHOAMI, whoami, echo, $PATH:/usr/ucb) PKG_PROG_PKG_CONFIG +# If the modern mechanism failswe may havew an older pkg-config +# so try looking it up the old fashioned way. +if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG,pkg-config,,) +fi + #-------------------------------------------------------------------- # specific target_os options