From 7b7bed60b1289f232dcf9a82d72c20bccdb5124a Mon Sep 17 00:00:00 2001 From: leleliu008 Date: Tue, 17 Oct 2023 16:39:33 +0800 Subject: [PATCH] optimized Signed-off-by: leleliu008 --- src/install.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/install.c b/src/install.c index 58fe06d..c190e7b 100644 --- a/src/install.c +++ b/src/install.c @@ -3019,6 +3019,25 @@ static int ppkg_install_package( ////////////////////////////////////////////////////////////////////////////// + char m4Path[PATH_MAX]; + size_t m4PathLength = 0U; + + ret = exe_where("m4", m4Path, PATH_MAX, &m4PathLength); + + if (ret < 0) { + perror(NULL); + return PPKG_ERROR; + } + + if (m4PathLength > 0U) { + if (setenv("M4", m4Path, 1) != 0) { + perror("M4"); + return PPKG_ERROR; + } + } + + ////////////////////////////////////////////////////////////////////////////// + int nativePackageIDArray[20] = {0}; int nativePackageIDArraySize = 0;