Skip to content

Commit

Permalink
Bug fix: Linker errors using automake in Mac OS
Browse files Browse the repository at this point in the history
Fix linker issues that prevent compillation with gcc from succeeding
using autotools.

This allows compilation to succeeed in Mac OS - haven't tested on linux
yet.

Fixes: #161
Signed-off-by: Abishek V Ashok <[email protected]>
  • Loading branch information
abishekvashok committed Dec 28, 2022
1 parent d86b2a0 commit 9722743
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE

AC_CANONICAL_HOST
host_osx=no
native_windows=no
case $host in
*mingw*)
native_windows=yes
;;
*darwin*)
host_osx=yes
;;
*)
native_windows=no
;;
esac

Expand Down Expand Up @@ -83,6 +88,11 @@ if test x$native_windows != xno; then
CFLAGS="$CFLAGS -static"
fi

dnl Add -D_XOPEN_SOURCE_EXTENDED to enable wide char support in Mac OS
if test x$host_osx != xno; then
CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
fi

dnl cmatrix terminal font disable option (default enabled)
AC_ARG_WITH([fonts],
AS_HELP_STRING([--without-fonts], [Install cmatrix without cmatrix font]),
Expand Down

0 comments on commit 9722743

Please sign in to comment.