From 54044cd745c5a0aa02cefe2b3946e4090959aa4d Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 27 Mar 2024 20:33:46 +0000 Subject: slibtoolize mode: install slibtool.m4 only with a specified m4 macro dir. --- src/logic/slbt_exec_stoolie.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/logic') diff --git a/src/logic/slbt_exec_stoolie.c b/src/logic/slbt_exec_stoolie.c index c29840b..698faaa 100644 --- a/src/logic/slbt_exec_stoolie.c +++ b/src/logic/slbt_exec_stoolie.c @@ -108,16 +108,20 @@ static int slbt_exec_stoolie_perform_actions( /* --force? */ if (dctx->cctx->drvflags & SLBT_DRIVER_STOOLIE_FORCE) { - if (slbt_exec_stoolie_remove_file(dctx,ictx->fdm4,"slibtool.m4") < 0) - return SLBT_NESTED_ERROR(dctx); + if (ictx->fdm4 >= 0) + if (slbt_exec_stoolie_remove_file(dctx,ictx->fdm4,"slibtool.m4") < 0) + return SLBT_NESTED_ERROR(dctx); if (slbt_exec_stoolie_remove_file(dctx,ictx->fdaux,"ltmain.sh") < 0) return SLBT_NESTED_ERROR(dctx); - fslibm4 = true; + fslibm4 = (ictx->fdm4 >= 0); fltmain = true; } else { - if (fstatat(ictx->fdm4,"slibtool.m4",&st,AT_SYMLINK_NOFOLLOW) == 0) { + if (ictx->fdm4 < 0) { + fslibm4 = false; + + } else if (fstatat(ictx->fdm4,"slibtool.m4",&st,AT_SYMLINK_NOFOLLOW) == 0) { fslibm4 = false; } else if (errno == ENOENT) { -- cgit v1.2.3