summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-22 16:24:03 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-22 16:31:12 (EDT)
commitee3be7a6ec399ac5df0e699b11c547fceef0b29f (patch)
tree81405de6040338c98dd5c4a6d961c054558af6d5
parent9df6322a81a23f9b105633118acd20edaac39bd4 (diff)
configure.ac, Makefile.am: Find ldconfig
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac25
2 files changed, 26 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 83a33fc..9ad8673 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,6 +70,7 @@ do_subst = sed \
-e 's|[@]SH[@]|$(SH)|g' \
-e 's|[@]READELF[@]|$(READELF)|g' \
-e 's|[@]OPKG[@]|$(OPKG)|g' \
+ -e 's|[@]LDCONFIG[@]|$(LDCONFIG)|g' \
-e 's|[@]multiarch_libdir[@]|$(multiarch_libdir)|g' \
-e 's|[@]library_path[@]|$(library_path)|g' \
-e 's|[@]bindir[@]|$(bindir)|g' \
diff --git a/configure.ac b/configure.ac
index f1d0966..882f920 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,6 +97,31 @@ AC_ARG_WITH(
]
)
+AC_ARG_WITH(
+ [ldconfig],
+ [AS_HELP_STRING([--with-ldconfig=PATH], [path to ldconfig])],
+ [
+ case "${withval}" in
+ 'yes'|'')
+ AC_MSG_ERROR(
+ [--with-ldconfig requires an argument])
+ ;;
+ 'no')
+ AC_MSG_ERROR([ldconfig is required])
+ ;;
+ *)
+ LDCONFIG="${withval}"
+ ;;
+ esac
+ ],
+ [
+ AC_PATH_PROG([LDCONFIG], [ldconfig])
+ if test -z "${LDCONFIG}"; then
+ AC_MSG_ERROR([ldconfig not found])
+ fi
+ ]
+)
+
AC_ARG_ENABLE(
[multiarch-libdir],
[AS_HELP_STRING(