2013-09-26 17:14:40 +02:00

70 lines
1.8 KiB
Plaintext

$NetBSD: patch-ae,v 1.2 2013/01/26 23:11:14 wiz Exp $
Second chunk: automake-1.13 compat
Rest: ?
--- configure.ac.orig 2008-02-05 04:11:37.000000000 +0000
+++ configure.ac
@@ -33,12 +33,14 @@ case $host_os in
linux*) HOST_OS=linux;;
hpux*) HOST_OS=hpux;;
freebsd*) HOST_OS=freebsd;;
+ netbsd*) HOST_OS=netbsd;;
*) HOST_OS=unknown;;
esac
AC_SUBST(HOST_OS)
AM_CONDITIONAL(LINUX, test "$HOST_OS" = linux)
AM_CONDITIONAL(HPUX, test "$HOST_OS" = hpux)
AM_CONDITIONAL(FREEBSD, test "$HOST_OS" = freebsd)
+AM_CONDITIONAL(NETBSD, test "$HOST_OS" = netbsd)
# Version number definitions
#
@@ -80,12 +82,11 @@ AC_PREFIX_DEFAULT(/usr/local)
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
# Specify a configuration file
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
AM_ACLOCAL_INCLUDE(macros)
# Checks for programs.
AC_PROG_CC( icc ecc gcc3 cc gcc )
-AM_PROG_CC_STDC
AM_PROG_AS
AC_PROG_INSTALL
AC_PROG_LN_S
@@ -259,6 +260,10 @@ if test "$HOST_OS" = freebsd; then
LDFLAGS="$LDFLAGS -lutil"
fi
+if test "$HOST_OS" = netbsd; then
+ LDFLAGS="$LDFLAGS -lutil"
+fi
+
dnl Check for optional libs
AC_CHECK_LIB(unwind-ia64, _Uia64_get_proc_name, )
@@ -331,6 +336,13 @@ if test "$HOST_OS" = hpux; then
check_curses=no], [])
fi
+if test "$HOST_OS" = netbsd; then
+ # Not ported to NetBSD curses yet.
+ AC_SEARCH_LIBS(tgetent, ncurses,
+ [check_curses=no],
+ [AC_MSG_ERROR(Required ncurses library not found.)])
+fi
+
if test "x$check_curses" != xno; then
AC_CHECK_LIB(curses, tgetent, [],
[AC_CHECK_LIB(ncurses, tgetent, ,
@@ -347,6 +359,7 @@ case $host_os in
hpux10*) CFLAGS="$CFLAGS -DHPUX1020";;
hpux11*) CFLAGS="$CFLAGS -DHPUX1100";;
freebsd*) CFLAGS="$CFLAGS -DFREEBSD -D__linux__";;
+ netbsd*) CFLAGS="$CFLAGS -DNETBSD -D__linux__";;
esac
dnl Add extra flags to CFLAGS depending on compiler