]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/aclocal.m4
ncurses 6.4 - patch 20230128
[ncurses.git] / Ada95 / aclocal.m4
index 994e87ceed26b36b89f778647c6c33db793df25b..e96b6d16df243d082fa451e5b605283f3782585c 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.198 2023/01/11 09:05:23 tom Exp $
+dnl $Id: aclocal.m4,v 1.199 2023/01/22 18:37:42 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -4815,7 +4815,7 @@ eval $3="$withval"
 AC_SUBST($3)dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PKG_CONFIG_LIBDIR version: 20 updated: 2022/01/29 17:03:42
+dnl CF_WITH_PKG_CONFIG_LIBDIR version: 21 updated: 2023/01/22 13:37:42
 dnl -------------------------
 dnl Allow the choice of the pkg-config library directory to be overridden.
 dnl
@@ -4826,7 +4826,8 @@ dnl b) $PKG_CONFIG_LIBDIR (tested second, added if set)
 dnl c) builtin-list (added if $PKG_CONFIG_LIBDIR is not set)
 dnl
 dnl pkgconf (used with some systems such as FreeBSD in place of pkg-config)
-dnl optionally ignores $PKG_CONFIG_LIBDIR.
+dnl optionally ignores $PKG_CONFIG_LIBDIR.  Very old versions of pkg-config,
+dnl e.g., Solaris 10 also do not recognize $PKG_CONFIG_LIBDIR.
 AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
 
 case "$PKG_CONFIG" in
@@ -4839,7 +4840,13 @@ case "$PKG_CONFIG" in
 esac
 
 # if $PKG_CONFIG_LIBDIR is set, try to use that
-cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[         ]]*,,'`
+if test -n "$PKG_CONFIG_PATH"; then
+       cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[[    ]]*,,' -e 's,[[         ]]*$,,'`
+elif test -n "$PKG_CONFIG_LIBDIR"; then
+       cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[  ]]*,,' -e 's,[[         ]]*$,,'`
+else
+       cf_search_path=auto
+fi
 
 # if the option is used, let that override.  otherwise default to "libdir"
 AC_ARG_WITH(pkg-config-libdir,