diff options
author | midipix <writeonce@midipix.org> | 2024-03-25 07:11:04 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-25 07:11:04 +0000 |
commit | a98361d754d5d14499f8e3c8dee6163245fd6680 (patch) | |
tree | a0dbc43528c8dc4a25982775dc4ce3525089ef97 /src | |
parent | 0dcc399ca713114a3d80b52e6dcf0ccd62fb2ae5 (diff) | |
download | slibtool-a98361d754d5d14499f8e3c8dee6163245fd6680.tar.bz2 slibtool-a98361d754d5d14499f8e3c8dee6163245fd6680.tar.xz |
slibtoolize mode: slbt_st_get_stoolie_ctx(): support AC_CONFIG_MACRO_DIR.
Diffstat (limited to 'src')
-rw-r--r-- | src/stoolie/slbt_stoolie_ctx.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/stoolie/slbt_stoolie_ctx.c b/src/stoolie/slbt_stoolie_ctx.c index 337cb47..ec87821 100644 --- a/src/stoolie/slbt_stoolie_ctx.c +++ b/src/stoolie/slbt_stoolie_ctx.c @@ -157,7 +157,6 @@ int slbt_st_get_stoolie_ctx( SLBT_NESTED_ERROR(dctx)); } - /* aux dir */ if (!ctx->auxbuf && ctx->cfgac) { if (slbt_m4fake_expand_cmdarg( dctx,ctx->cfgac, @@ -175,7 +174,38 @@ int slbt_st_get_stoolie_ctx( } /* m4 dir */ - if (ctx->makam) { + if (ctx->acinc) { + if (slbt_m4fake_expand_cmdarg( + dctx,ctx->acinc, + "AC_CONFIG_MACRO_DIR", + &pathbuf) < 0) + return slbt_st_free_stoolie_ctx_impl( + ctx,(-1), + SLBT_NESTED_ERROR(dctx)); + + if (pathbuf[0]) + if (!(ctx->m4buf = strdup(pathbuf))) + return slbt_st_free_stoolie_ctx_impl( + ctx,(-1), + SLBT_NESTED_ERROR(dctx)); + } + + if (!ctx->m4buf && ctx->cfgac) { + if (slbt_m4fake_expand_cmdarg( + dctx,ctx->cfgac, + "AC_CONFIG_MACRO_DIR", + &pathbuf) < 0) + return slbt_st_free_stoolie_ctx_impl( + ctx,(-1), + SLBT_NESTED_ERROR(dctx)); + + if (pathbuf[0]) + if (!(ctx->m4buf = strdup(pathbuf))) + return slbt_st_free_stoolie_ctx_impl( + ctx,(-1), + SLBT_NESTED_ERROR(dctx)); + } + if (!ctx->m4buf && ctx->makam) { for (pline=ctx->makam->txtlinev; !ctx->m4argv && *pline; pline++) { if (!strncmp(*pline,"ACLOCAL_AMFLAGS",15)) { if (isspace((*pline)[15]) || ((*pline)[15] == '=')) { |