MKC_CHECK_FUNCLIB(1)

πŸ’… MKC_CHECK_FUNCLIB πŸ’…

okay so bestie, welcome to mkc_check_funclib, a page from the MKC_CHECK_FUNCLIB(1) manual β€” yes that's the whole name, she's iconic like that. basically this little tool detects the presence of a function in a library, and she'll tell you the truth, no cap 🫢


✨ SYNOPSIS ✨

mkc_check_funclib <functionname> [libraries...]
mkc_check_funclib -h

like, you give her a function name, optionally followed by some libraries, and she goes to work 🧚


🌸 DESCRIPTION 🌸

mkc_check_funclib detects the presence of a function in a library by literally compiling and linking a test program. yes, she actually does the thing, she's not just guessing πŸ’…

as a result, it prints either 1 (true) or 0 (false) to stdout. that's it. that's the whole vibe check. ⭐


πŸŽ€ OPTIONS πŸŽ€

  • -h β€” displays the help message. your little "what do i do" button, use her πŸ’–
  • -d β€” deletes the cache and the temporary files. full reset, main character energy πŸ”₯
  • -D β€” deletes the cache files only. like -d but she leaves the temp files alone πŸ™ˆ

πŸ¦‹ ENVIRONMENT πŸ¦‹

  • CC β€” the compiler. by default cc is used.
  • CPPFLAGS, CFLAGS β€” options passed to the compiler, for example -I for extra directories that contain header files.
  • LDFLAGS β€” options passed to the linker (that's the compiler, set by the CC variable), for example -L/usr/local/lib.
  • LDADD β€” extra libraries, for example -lm.
  • MKC_VERBOSE β€” if set to 1, verbose messages are output to stderr.
  • MKC_SHOW_CACHED β€” if set to 1 and MKC_VERBOSE is set to 1, cached results are output to stderr.
  • MKC_CACHEDIR β€” the directory where temporary and cache files get created. if unset, they're created in the current directory.
  • MKC_NOCACHE β€” all results are cached unless the MKC_NOCACHE variable is set to 1. read that twice bestie, it's a double negative and she's serving πŸ’€
  • MKC_DELETE_TMPFILES β€” if set to 1, temporary files are removed.

🌈 EXAMPLES 🌈

like, actual receipts, here's how you'd call her:

mkc_check_funclib dlopen dl
mkc_check_funclib dlopen
mkc_check_funclib strlcpy
mkc_check_funclib select socket

see? dlopen with dl, then dlopen all by herself, then strlcpy solo, then select with socket. slay, so versatile πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Aleksey Cheusov <vle@gmx.net> β€” the icon who made this happen πŸ’œ


okay that's the whole page bestie, go compile something cute ✨ and yeah, this beauty is dated Dec 2, 2023, straight from the MKC_CHECK_FUNCLIB(1) manual β€” periodt πŸ’…πŸŽ€

πŸ“¦ where this page comes from