tinyfugue on an m-series mac

If you want to get tinyfugue running on your M-series Mac, and don’t want to use tinyfugue - rebirth, you can get Ken Keys’ original-recipe tinyfugue to compile by doing the following:

  • install PCRE, e.g. for homebrew brew install pcre

  • Put this patch in src/main.c just below #include “process.h”:

#ifndef PCRE_INFO_OPTIONS
#define PCRE_INFO_OPTIONS 0
#endif

#include <pcre.h>
int pcre_info(const pcre *code, int *optptr, int *firstcharptr) {
    if (optptr)
        pcre_fullinfo(code, NULL, PCRE_INFO_OPTIONS, optptr);
    if (firstcharptr)
        *firstcharptr = -1;  // not directly supported anymore
    return 0;
}
  • At the top of src/malloc.c, add: #include <stdlib.h>

  • Build with the following steps:

export CFLAGS="-std=c89 -Wno-implicit-function-declaration -I/opt/homebrew/opt/pcre/include"

export LDFLAGS="-L/opt/homebrew/opt/pcre/lib"

./configure

make LIBS="/opt/homebrew/opt/pcre/lib/libpcre.dylib -lz -ltermcap"

Binary and library locations will be at the bottom of the output.