From d70e3766bc3c84b11a1d574cf12826d0df62e889 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 14 Sep 2020 09:47:18 +0000 Subject: heuristics: support finding arbitrarily named scripts up the build tree. --- src/internal/slibtool_lconf_impl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c index 92aaa20..6b55c9f 100644 --- a/src/internal/slibtool_lconf_impl.c +++ b/src/internal/slibtool_lconf_impl.c @@ -45,7 +45,7 @@ static int slbt_lconf_open( fdcwd = slbt_driver_fdcwd(dctx); fdlconfdir = fdcwd; - if (lconf) + if (lconf && strchr(lconf,'/')) return ((fdlconf = openat(fdcwd,lconf,O_RDONLY,0)) < 0) ? SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_LCONF_OPEN) : fdlconf; @@ -53,7 +53,8 @@ static int slbt_lconf_open( if (fstatat(fdlconfdir,".",&stcwd,0) < 0) return SLBT_SYSTEM_ERROR(dctx); - fdlconf = openat(fdlconfdir,"libtool",O_RDONLY,0); + lconf = lconf ? lconf : "libtool"; + fdlconf = openat(fdlconfdir,lconf,O_RDONLY,0); stinode = stcwd.st_ino; while (fdlconf < 0) { @@ -81,7 +82,7 @@ static int slbt_lconf_open( } fdlconfdir = fdparent; - fdlconf = openat(fdlconfdir,"libtool",O_RDONLY,0); + fdlconf = openat(fdlconfdir,lconf,O_RDONLY,0); stinode = stparent.st_ino; } -- cgit v1.2.3