From 87cdaae6e546c5aaa8b5db086572d5bfbe69c97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20H=C3=A5llberg?= Date: Thu, 1 Jan 2009 03:01:41 +0100 Subject: make --enable-bsd default on OS X (darwin) hosts diff --git a/ChangeLog.old b/ChangeLog.old index 9a7fad4..c5ef1dd 100644 --- a/ChangeLog.old +++ b/ChangeLog.old @@ -1,5 +1,7 @@ 2008-12-31 dain + * build: Fixed build out of the box on OS X by turning on + --enable-bsd by default on darwin hosts. * cmd2.c: Fixed some problems related to binding keys with the high bit set. diff --git a/configure.in b/configure.in index 891fa09..e46e902 100644 --- a/configure.in +++ b/configure.in @@ -2,6 +2,8 @@ AC_INIT AM_INIT_AUTOMAKE(powwow, 1.2.13) +AC_CANONICAL_HOST + AC_ARG_ENABLE(vt100, AC_HELP_STRING([--enable-vt100], [Hard code VT100 escape sequences; use if you have no termcap ]), @@ -36,12 +38,15 @@ AC_ARG_ENABLE(ansibug, AC_ARG_ENABLE(bsd, AC_HELP_STRING([--enable-bsd], - [Needed for BSD systems, in powwow this was USE_SGTTY and BSD_LIKE]), - [case "${enableval}" in - yes) AC_DEFINE(USE_SGTTY) - AC_DEFINE(BSD_LIKE) ;; - no) ;; - esac]) + [Needed for BSD systems, in powwow this was USE_SGTTY and BSD_LIKE. Default on Darwin (OS X) systems.])) +AS_IF([ test -z "${enable_bsd}" ], + [ case "${host_os}" in + darwin*) enable_bsd=yes ;; + *) enable_bsd=no ;; + esac]) +AS_IF([ test "${enable_bsd}" = yes ], + [ AC_DEFINE(USE_SGTTY) + AC_DEFINE(BSD_LIKE) ]) # Checks for programs. AC_PROG_CC -- cgit v0.10.2