From 0139e38d10d7a2e50bc07a7a10a9fffbf1761c78 Mon Sep 17 00:00:00 2001 From: Louie Shprung Date: Sat, 7 Jan 2023 15:01:28 -0800 Subject: Add conditional for build platform --- configure.ac | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 205deb8..61642f7 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,26 @@ if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then AC_MSG_ERROR([requires an X/Open-compatible Curses library with color]) fi +# Temporary fix for differentiating Unix and Windows builds +AC_CANONICAL_HOST + +build_unix=no +build_windows=no + +# Detect the target system +case "${host_os}" in + cygwin*|mingw*) + build_windows=yes + ;; + *) + build_unix=yes + ;; +esac + +# Pass the conditionals to automake +AM_CONDITIONAL([UNIX], [test "$build_unix" = "yes"]) +AM_CONDITIONAL([WINDOWS], [test "$build_windows" = "yes"]) + AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT -- cgit