]> diplodocus.org Git - nmh/blobdiff - configure.ac
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / configure.ac
index c778a150fd05ef712f41de200df42c370a0b022f..4ed79bbccfeb8695d8e8693264878d3cd73cf52c 100644 (file)
@@ -96,7 +96,8 @@ dnl CHECK HEADER FILES
 dnl ------------------
 
 AC_HEADER_TIOCGWINSZ
 dnl ------------------
 
 AC_HEADER_TIOCGWINSZ
-AC_CHECK_HEADERS([fcntl.h wchar.h wctype.h sys/param.h sys/time.h sys/stream.h])
+AC_CHECK_HEADERS([fcntl.h stdbool.h wchar.h wctype.h \
+                  sys/param.h sys/time.h sys/stream.h])
 
 AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1,
   [Define to 1 if `struct winsize' requires <sys/ptem.h>.]),,
 
 AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1,
   [Define to 1 if `struct winsize' requires <sys/ptem.h>.]),,
@@ -110,6 +111,10 @@ dnl CHECK FUNCTIONS
 dnl ---------------
 AC_CHECK_FUNCS([wcwidth mbtowc getutxent arc4random mkstemps])
 
 dnl ---------------
 AC_CHECK_FUNCS([wcwidth mbtowc getutxent arc4random mkstemps])
 
+dnl Use custom getline for platforms that don't have it.
+AC_CONFIG_LIBOBJ_DIR([sbr])
+AC_REPLACE_FUNCS([getline])
+
 dnl -----------------------
 dnl CHECK MULTIBYTE SUPPORT
 dnl -----------------------
 dnl -----------------------
 dnl CHECK MULTIBYTE SUPPORT
 dnl -----------------------
@@ -134,7 +139,7 @@ if test "$GCC" != yes; then
   dnl better to use an autoconf test, except -v will probably succeed
   dnl with many other compilers but have different meaning.
   AS_CASE([`${CC} -V 2>&1`],
   dnl better to use an autoconf test, except -v will probably succeed
   dnl with many other compilers but have different meaning.
   AS_CASE([`${CC} -V 2>&1`],
-          [cc:\ Sun\ C*], [CFLAGS=\
+          [cc:*\ Sun\ C*], [CFLAGS=\
 "${CFLAGS:+$CFLAGS }-v -errtags=yes -erroff=E_STATEMENT_NOT_REACHED"])
 fi
 
 "${CFLAGS:+$CFLAGS }-v -errtags=yes -erroff=E_STATEMENT_NOT_REACHED"])
 fi