|
|
23b101 |
/*******************************************************************/
|
|
|
eac61a |
/* slibtool: a strong libtool implementation, written in C */
|
|
|
49181b |
/* Copyright (C) 2016--2024 SysDeer Technologies, LLC */
|
|
|
23b101 |
/* Released under the Standard MIT License; see COPYING.SLIBTOOL. */
|
|
|
23b101 |
/*******************************************************************/
|
|
|
23b101 |
|
|
|
23b101 |
#include <stdio.h>
|
|
|
23b101 |
#include <string.h>
|
|
|
23b101 |
#include <stdbool.h>
|
|
|
23b101 |
|
|
|
23b101 |
#include <slibtool/slibtool.h>
|
|
|
a82cc2 |
#include "slibtool_driver_impl.h"
|
|
|
a82cc2 |
#include "slibtool_dprintf_impl.h"
|
|
|
23b101 |
#include "slibtool_errinfo_impl.h"
|
|
|
23b101 |
|
|
|
23b101 |
static const char enable[] = "enable";
|
|
|
23b101 |
static const char disable[] = "disable";
|
|
|
23b101 |
|
|
|
23b101 |
int slbt_output_features(const struct slbt_driver_ctx * dctx)
|
|
|
23b101 |
{
|
|
|
a82cc2 |
int fdout;
|
|
|
23b101 |
const char * shared_option;
|
|
|
23b101 |
const char * static_option;
|
|
|
23b101 |
|
|
|
a82cc2 |
fdout = slbt_driver_fdout(dctx);
|
|
|
a82cc2 |
|
|
|
23b101 |
shared_option = (dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_SHARED)
|
|
|
23b101 |
? disable : enable;
|
|
|
23b101 |
|
|
|
23b101 |
static_option = (dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_STATIC)
|
|
|
23b101 |
? disable : enable;
|
|
|
23b101 |
|
|
|
a82cc2 |
if (slbt_dprintf(fdout,"host: %s\n",dctx->cctx->host.host) < 0)
|
|
|
6beda1 |
return SLBT_SYSTEM_ERROR(dctx,0);
|
|
|
23b101 |
|
|
|
a82cc2 |
if (slbt_dprintf(fdout,"%s shared libraries\n",shared_option) < 0)
|
|
|
6beda1 |
return SLBT_SYSTEM_ERROR(dctx,0);
|
|
|
23b101 |
|
|
|
a82cc2 |
if (slbt_dprintf(fdout,"%s static libraries\n",static_option) < 0)
|
|
|
6beda1 |
return SLBT_SYSTEM_ERROR(dctx,0);
|
|
|
23b101 |
|
|
|
a82cc2 |
return 0;
|
|
|
23b101 |
}
|